TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: RICK BISCHOFF
from: PETER HAYWOOD
date: 1997-04-09 01:45:00
subject: Re: Bit Fields

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.