Although this is NOT a "palm" question...
The standard technique is to do a "bitwise AND" ( a "&" in C) operation on the
variable in question.
Something like :
if (byteVariable & 0x80 == 0x80) {
printf("\n%s","Bit 7 is on!");
}
See ANY book on C.
Dan
Zach Austin wrote:
> 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/