Re: Bitfields

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 09/26/97

On Thu, 25 Sep 1997, Daniel Koepke wrote:

>A good solution would be clean, without wasting memory,
>and flexible.  And as of yet, no such implementation is
>out there (to my knowledge).  Sucks, don't it?

Trying to make one. :)

>  int bit0 : 1;

Nod, knew it.

>  int bitv;


>Bitvector array:
>  int bitv[4];

Close to what I'm doing.

>Stranger bitvector array:
>  #define MAX_BITS(n)   (n / 8)
>  unsigned char bitv2[MAX_BITS(128)];

You're way off what I'm doing there. :)

>And I bet you were all thinking that I still had a shred of
>sanity...right up until that previous paragraph. :)

Sanity is relative.

George Greer  -   | Genius may have its limitations, but stupidity | is not thus handicapped. -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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