One more point regarding = and == (more flamage)

Alan Barclay alan at ukpoit.co.uk
Sat Apr 6 00:15:02 AEST 1991


In article <91087.152922KKEYTE at ESOC.BITNET> KKEYTE at ESOC.BITNET (Karl Keyte) writes:
>
> float (*(*(****(*(*myfunc())())"5")())())()
>
>is quite legal when one wants to declare a function 'myfunc' as one returning
>a pointer to function returning a pointer to an array of 5 pointers to a
>pointer to a pointer to a pointer to a function returning a pointer to a
>function returning a pointer to a function returning float
>

no it isn't, presuming that the "5" is a typo for [5], then your declaration
is float (*(*(****(*(*myfunc())())[5])())())(), which according to dcl, as
found in K&R2 is

myfunc:  function returning pointer to function returning pointer to
array[5] of pointer to pointer to pointer to pointer to function
returning pointer to function returning pointer to function returning
float

I.E, where you have three "pointer to", in sucession you should have
four.



More information about the Comp.lang.c mailing list