Groovy hepcat Rick Bischoff jived with All on 20 Mar 97 10:29:08!
Bit Fields's a cool scene. Dig it!
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)) ???
In other words, a boolean type? Well, you can't. You can, however,
do one of two things. You could declare an int (or a short or even a
char) and use that for one boolean value. (You could even use the
typedef keyword to create a new BOOL type.) The other thing you could
do is use one int (or short or long or whatever) to hold many boolean
values, then use bitwise AND (&) and OR (|) operators to manipulate
each bit.
Wolvaen
... "X is an integer," Tom declared.
--- Blue Wave/RA v2.20
---------------
* Origin: The Gate, Melbourne Australia, +61-3-9809-5097 28.8k (3:633/159)
|