Path: utzoo!attcan!uunet!snorkelwacker!mit-eddie!uw-beaver!ubc-cs!alberta!mts.ucs.UAlberta.CA!Al_Dunbar From: userAKDU@mts.ucs.UAlberta.CA (Al Dunbar) Newsgroups: comp.lang.c Subject: Re: more that 32 flag array testing Message-ID: <1444@mts.ucs.UAlberta.CA> Date: 11 Oct 90 03:06:02 GMT References: <1990Oct8.165154.26747@vitro.uucp> <4811@baird.cs.strath.ac.uk> Organization: MTS Univ of Alberta Lines: 39 In article <4811@baird.cs.strath.ac.uk>, rmacgreg@cs.strath.ac.uk (Sorcerer) writes: >I don't know if this will work, never having tried it myself, It must have seemed a particularly onerous task ... :-) > but C allows >for bitfields in structs. Normally these are just a couple of bits, but I >see no reason why you couldn't define a bitfield to be 100 bits long. > >There has to be a problem with this as it sounds to simple, but you never >know... :-) > > ___ > _____ / (rmacgreg @ uk.ac.strath.cs) > | |__ __ /___ ___ ___ ___ ___ ___ ___ ___ > | | | |__| / / / / / / /__/ / / /__/ / / > | | | |__ ___/ /__/ / /__ /__ / /__ / > > is 'Only visiting this planet.' Here are a couple of possible reasons: K&R2: "Fields behave like small, unsigned integers, and may participate in arithmetic expressions just like other integers." K&R2: "A field may not overlap an int boundary..." K&R2: "... they may be stored only in int's (or, equivalently, unsigned's ..." How would you declare a bitfield wider than the widest available int? -------------------+------------------------------------------- Al Dunbar | Edmonton, Alberta | this space for rent CANADA | -------------------+-------------------------------------------