Functions within structures

Doug Gwyn gwyn at smoke.brl.mil
Tue Nov 13 00:20:31 AEST 1990


In article <1990Nov10.155153.20639 at chinet.chi.il.us> john at chinet.chi.il.us (John Mundt) writes:
>		some_value = (*menu[whatever].fptr)();
>		some_value = (menu[whatever].fptr)();
>produce the same assembler code on at least one machine, and both
>work, though the first one is the one that is considered correct.

Actually the second one is more "theoretically" correct.  The function
designator in the first expression is automatically converted to a
pointer to the function; the second form is already that way.



More information about the Comp.lang.c mailing list