structure element offsets

Kenneth R. Ballou ballou at brahms
Wed Dec 10 07:31:00 AEST 1986


In article <736 at dg_rtp.UUCP> throopw at dg_rtp.UUCP (Wayne Throop) writes:
>> C has been defined such that all members-of-structures share the
>> same name-space.
>You're wrong, you know.  Members of structures do NOT share the same
>namespace in C, no more than =+ is an operator in C.  Let us chant
>together, from Harbison and Steele, page 107:
	[an appropriate incantation has been deleted]
>Kernighan and Ritchie have similar things to say, but I don't (GASP)
>have my K&R to hand just now to find what they are, 
    For shame!  Actually, this is not true.  In K&R C structure members all
belong to the same namespace.  The separation of namespaces for each
structure/union is a (thoroughly welcome) later enhancement.

--------
Kenneth R. Ballou		ARPA: ballou at brahms.berkeley.edu
Department of Mathematics	UUCP: ...!ucbvax!brahms!ballou
University of California
Berkeley, California  94720



More information about the Comp.lang.c mailing list