Register functions ? (strange constructs)

Dick Dunn rcd at opus.UUCP
Tue Sep 18 11:17:01 AEST 1984


>As long as we're proposing strange constructs, how about unnamed variables?
>For example, at the top level:
>
>	char[] = "This is a string";

That's hardly strange.  Actually, the form of a type name without any
associated list of variables occurs in other languages (and I believe in
the emerging C standard) in a formal parameter list.  I've also seen it
used for alignment information in a structure--a structure field which is
given a type but no name occupies the amount of storage required for the
type but is otherwise inaccessible--e.g., in C-ish syntax you might have:
	struct {
		short bletch;
		int garg:3;
		int :2;		/* unused and inaccessible space */
		int blip:3;
	}
-- 
Dick Dunn	{hao,ucbvax,allegra}!nbires!rcd		(303)444-5710 x3086
   ...Never offend with style when you can offend with substance.



More information about the Comp.lang.c mailing list