more that 32 flag array testing

Al Dunbar userAKDU at mts.ucs.UAlberta.CA
Thu Oct 11 13:06:02 AEST 1990


In article <4811 at baird.cs.strath.ac.uk>, rmacgreg at 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             |
-------------------+-------------------------------------------



More information about the Comp.lang.c mailing list