bit fields in C

parnass at ihuxf.UUCP parnass at ihuxf.UUCP
Sat Aug 13 00:06:03 AEST 1983



       There  have  been  some	recent	net  submissions  lamenting
       compiler	 objections  to	the declaration	of long	bit fields.
       According to "The C  Programming	 Language"  (page  137)	 by
       Brian W.	Kernighan and Dennis M.	Ritchie:

		  "A field is a	 set  of  adjacent  bits  within  a
		 single	int....	 Fields	behave like small, unsigned
		 integers,  and	 may  participate   in	 arithmetic
		 expressions just like other integers."


		       Robert S. Parnass
		       Bell Laboratories
		       Naperville, IL
		       ihnp4!ihuxf!parnass



More information about the Comp.lang.c mailing list