D
Dag-Erling Smørgrav
Richard Delorme said:The problem is for the compiler to know the type of a function without
asking the programmer to explicitly write a function declaration. If
the function is defined in the same compilation unit I guess there is
no much problem. When using several compilation units, we need to tell
the compiler on how to find the information by itself. We can imagine
several ways to achieve this:
- In the source file, use a new instruction that indicates where to
find the function type. For example:
#interface "square.c"
int main()
{
/*... code using the function square... */
}
So #interface will open the square.c file and decipher the function
type from its definition.
What if square.c is not available?
DES