What goes where?
18-Feb-88 00:39:21
Sb: #109707-What goes where?
Fm: Don Curtis/SYSOP 76703,4321
To: Ben Blish 72667,1341
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
You can pass a function pointer and then call that function by
placing '()' after the name:
char *
george(a,b,c)
int a,b,c;
{
do something
return(char *);
}
harry(sam)
char *sam();
{
char *string;
string = sam();
}
bill()
{
harry(george);
}
Make sense? If not, look on page 118 of Harbison and Steele.
In the above case…the function pointer sam was passed as the
address of 'george' which is the actual function called by the line:
string=sam();