Mail Archives: djgpp/1997/07/30/16:07:25
Chris Frolik wrote:
> I don't believe you need the '&' operator here, or the '*' operator with
> the function call.  For example, if I have a function and a function
> pointer:
You are correct.  The address-of operator is superfluous when dealing with
a function pointer; the function's identified alone acts as a function
pointer.
Additionally, explicitly dereferencing the function when you call it is a
matter of style and is not required by ANSI C.  In fact, the derefencing
is completely transparent:  you could just as easily use 
    int (*fp)(void);
    fp();
    (*fp)();
    (********************fp)();
The latter call through a function pointer is, believe it or not,
perfectly good ANSI C.
-- 
       Erik Max Francis, &tSftDotIotE / email / mailto:max AT alcyone DOT com
                     Alcyone Systems /   web / http://www.alcyone.com/max/
San Jose, California, United States /  icbm / 37 20 07 N  121 53 38 W
                                   \
   "Love is not love which alters / when it alternation finds."
                                 / William Shakespeare, _Sonnets_, 116
- Raw text -