How do I declare... (I knew that!)
Wayne Throop
throopw at rtp47.UUCP
Fri Aug 30 03:20:55 AEST 1985
I have been inundated with a flood of postings and mail saying "you
can so declare a pointer to a function returning a pointer to a
function". I started replying by mail, but this proves impractical due
to volume. Let me introduce my defense as I did in the first letter I
sent out:
"Aaaarrrrgggghhhh!"
There. I feel better now. I really *did know* that you can declare
pointers to arrays of pointers to arrays (of primitive types), and
pointers to functions returning pointers to functions (returning
primitive types). I thought it was clear from the context that I meant
that it is impossible to declare a pointer to a function returning
pointer to function *of that function's own type*. But noooooooo! All
you nit-pickers assumed I meant what I said! Sheeesh! :-)
In any event, I still maintain that C's type notation is deficent, in
that it only allows recursion in declarations of structs, unions, and
enums (and I haven't found a use for recursion in enums). It does *not*
allow recursion in type declaractions that contain only pointer,
function, or array constructs.
If you wish to show me the error of my ways, mail or post a typedef F
of a pointer-to-function-returning-type-F. My claim is that C allows no
such constructs, and that this lack is a shortcoming of the C language.
--
Wayne Throop at Data General, RTP, NC
<the-known-world>!mcnc!rti-sel!rtp47!throopw
More information about the Comp.lang.c
mailing list