// vars that aren''t defined in this snippet...
bool Enabled;
enum CommandFlag {CF_ENABLE = 0x08};
BYTE Command;
if (Enabled)
Command |= CF_ENABLE;
else
Command &= ~CF_ENABLE;
So, if everything was right with the world, it would set bit 3 of the Command byte high or low depending on if Enabled is true or false, right? Somehow it doesn''t work. I''m wondering if maybe it has something to do with enum being an int and Command being a byte? Any thoughts? This one''s had me stumped for more than a week...
--------------------You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming
You are unique. Just like everybody else.
"Mechanical engineers design weapons; civil engineers design targets."
"Sensitivity is adjustable, so you can set it to detect elephants and other small creatures." -- Product Description for a vibration sensor