A question on Function declaration

Tim McDaniel mcdaniel at adi.com
Thu Feb 14 07:45:14 AEST 1991


The program cdecl is helpful in such cases, although I think it's
better to work with a precedence chart to figure out what it should
be.

   declare f as function (int, int) returning pointer to function
      (float) returning int
yields
   int (*f(int , int ))(float )
and
   declare f as function returning pointer to function returning int
yields
   int (*f())()

You can use one or the other depending on whether you have prototypes
available or not.

It has been posted on the net; e-mail me for a copy if you have to,
but please check a comp.sources.unix and comp.sources.misc archive
site first.

--
"I'd hang you from my nipples ... but it would shock the children."

Tim McDaniel                 Applied Dynamics Int'l.; Ann Arbor, Michigan, USA
Internet: mcdaniel at adi.com                UUCP: {uunet,sharkey}!amara!mcdaniel



More information about the Comp.lang.c mailing list