S
Seebs
Rod said:[The asterisk in (*fptr)()] also presents
a cleaner model of dereferencing.
<aol>
Absolutely.
</aol>
I'm torn on the issue. I like it for clarity, although I don't actually
always use it. I use it when it is part of the perceived interface that
the thing called is being a function pointer, usually. Example: In pseudo,
there's a number of function pointers named "real_foo()"; they are just called
as "real_foo(args)" because, although they happen to be function pointers,
they are not logically "pointers" subject to change -- they're fixed values
which happen to have been computed somewhere close to startup.
By contrast, if I'm doing a table of function pointers, I usually do
"(*foo->fptr)(args)", because it's important to the reader to know that
"fptr" may be any of several functions.
-s