Function Calls
Ron Natalie <ron>
ron at brl-tgr.ARPA
Tue Dec 18 02:28:16 AEST 1984
> extern int (*a)();
> extern int b();
> main()
> {
> a = b; /* b's type promoted to pointer to function ... */
>
> (*a)(); /* a legal function call */
> b(); /* also legal */
> a(); /* not legal, but often accepted */
Lattice C has this sickness, I believe.
>
> (b)(); /* the question: which of these is correct? */
> (*b)();
> }
>
Well (b)() is correct if b() is correct, why should parentheses hurt
you. "(*b)()" is illegal because (*b) is not a function.
-Ron
More information about the Comp.lang.c
mailing list