Why must bitfields sum to a multiple of a byte?

Era Scarecrow rtcvb32 at yahoo.com
Mon Jul 30 17:03:06 PDT 2012


On Tuesday, 31 July 2012 at 00:00:24 UTC, Era Scarecrow wrote:
Corrections:
  So, 2 variables using 4 bit ints would be

> void a(int v) @property {
>   value &= ~(0x7 << 4);
>   value |= (v & 0x7) << 4;
> }

the second setter should be
  void b(int v) @property {



More information about the Digitalmars-d-learn mailing list