Invoking pointers to functions (C sytle)
Henry Spencer
henry at zoo.toronto.edu
Sun Dec 2 10:26:04 AEST 1990
In article <6379 at harrier.ukc.ac.uk> dac at ukc.ac.uk (David Clear) writes:
>The (*p)(args) invocation is the K&R standard. p(args) also works on at
>least 4 different Unix compilers.
>
>Q: Is p(args) legal, portable C?
Once upon a time, it wasn't legal. Now it is. However, there are still
plenty of old compilers that may balk at it. I'd say the code is clearer
and more portable if you make the `*' explicit.
--
"The average pointer, statistically, |Henry Spencer at U of Toronto Zoology
points somewhere in X." -Hugh Redelmeier| henry at zoo.toronto.edu utzoo!henry
More information about the Comp.lang.c
mailing list