Zach,

if your bits are numbered:

8  7  6  5  4  3  2  1

then,

if( var & 0x40)
{
// Bit is set
}
else
{
// Bit is not set
}

-----Original Message-----
From: Zach Austin [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 14, 2000 12:24 PM
To: Palm Developer Forum
Subject: bits


If I have a byte how do I check if, for instance, bit 7 is set?  Thanks in
advance for helping a newbie.

--Zach



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to