Re: Bitvectors

From: George (greerga@CIRCLEMUD.ORG)
Date: 02/16/98


On Mon, 16 Feb 1998, Price Hall wrote:

>> Bitfields!
>> I haven't been able to work on a bitfields patch as my computer
>> has been in the shop the past couple of days :(
>
>What ARE bitfields?  I proudly proclaim my ignorance!  I assume its, uh, a
>field...of bits...but then...isn't everything? heheh

I would like bitfields much more if you could do:

  unsigned bits[1024] : 1;

Rather than:

  unsigned bit1 : 1;
  unsigned bit2 : 1;
  unsigned bit3 : 1;
  unsigned bit4 : 1;
  unsigned bit5 : 1;

GCC complains on that first one.

  unsigned bits : 1024;

And GCC complains the width is larger than the specified type there.

Ah well.

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST