declarations using pointers to functions

Chris Torek torek at elf.ee.lbl.gov
Thu Mar 21 07:58:58 AEST 1991


In article <1991Mar20.201937.6088 at ux1.cso.uiuc.edu> gordon at osiris.cso.uiuc.edu
(John Gordon) writes:
>     [] 	as "array of"

Actually, since there are only two cases where the brackets may be empty,
I would suggest instead reading

	[N]	as "array N of"

and
	[]	as "array ? of"

and NEVER forget the sizes until The Rule allows you to do so.

The size of any array is an important part of the type of that array;
it must not be disregarded at whim.

(The Rule allows you to discard the size whenever an <object, array N of T>
is used in a value context.  The two cases where the brackets may be
empty occur when declaring formal parameters to functions, and when
declaring `extern' objects.  Even then, only the `innermost' set of
brackets may be empty, and only if they immediately follow the
identifier.)
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA		Domain:	torek at ee.lbl.gov



More information about the Comp.lang.c mailing list