On (20 Mar 97) Rick Bischoff wrote to All...
RB> Does anyone know how to declare a variable that holds only one bit of
RB> information.. (You know only two values (0 or 1)) ???
It can only be done when the variable is a member of a struct, class or
union.
struct something {
unsigned whatever: 1;
unsigned something: 2;
};
You usually want a 1 bit variable to be usigned: otherwise if the bit is
set your value might be either 1 or -1, depending on the compiler. -1
is more common, but it's not guaranteed.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|