Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Verbose declarations proposal (Re: Address of Array) Message-ID: <9898@mimsy.UUCP> Date: 20 Dec 87 02:56:49 GMT References: <126@citcom.UUCP> <2550034@hpisod2.HP.COM> <1854@haddock.ISC.COM> <1449@houdi.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 30 Summary: You want cdecl In article <1449@houdi.UUCP> marty1@houdi.UUCP (M.BRILLIANT) writes: >... using the basic type declarators like int, char, etc., combined >with a few simple phrases: "pointer to", "function returning", >"array of", and maybe a few others. Any complicated type declaration, >if means anything at all, can be explained to a neophyte in these terms. I will let this assertion pass. Anyway ... > type (array[] of pointer to array[][5] of pointer to > function(double) returning array[3][5][7] of int) bar; >would be synonymous with a concise type declaration that I couldn't >write to save my life. % cdecl declare bar as array of pointer to array of array 5 of pointer to function(arg) returning array 3 of array 5 of array 7 of int [the last two are a single line, broken here for clarity] Warning: Unsupported in C -- Function returning array int (*(*bar[])[][5])(arg)[3][5][7] As you can see, this is not a legal declaration. Also, it needs sizes for the arrays if it is to be a type (change `int ...' to `typedef int ...' to make bar a typedef for this type). cdecl has been posted to the net many times; there are probably 24 copies on your machine already, each in some user's private directory. Why not find one and install it? -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris