Subject: C syntax wonders

From: omer mussaev <[email-masked]>
Date: Mon, 24 Jan 2005 08:03:34 -0800 (PST)

For the first time, I had seen following use (or
abuse) of C syntax:

Instead of declaring pointer to functions as:

   typedef int (*pfunction_t)(int arg) ;
   pfunction_t pfunc = aFunction ;

the code I saw uses 

   typedef int function_t (int arg) ;

and then uses 

   function_t *pfunc = aFunction ;

=====
--
o.m.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

---

From: Oleg Goldshmidt <[email-masked]>
Date: 24 Jan 2005 18:39:02 +0000

>    function_t *pfunc = aFunction ;

Looks legal to me, though I have not checked the appropriate
Testaments.

You can also do

extern int f(void);
int (*f)(void) = foo;

Does that bother you? ;-)

-- 
Oleg Goldshmidt | [email-masked]