I need to check a bit-packed status word for various combinations of
conditions that may or may not be On at the same time. Doing it in
decimal, checking every possible combination, is not practical.
Are there any functions to allow logical ANDing of signals to bit
patterns?
E.g., in VB I'd write
If Input_A And &H4 Then msg = "VideoIn Failure"
to see if the third bit of byte Input_A is On (= binary x1xx).
Anyway to do that besides checking a single bit at a time using
getbit()? One odd note about this device's status word, a decimal 63
(binary 0011 1111) means Boards Nominal, else each bit 0 through 5 means
a specific error which may or may not be happening at the same time. So
a nested IF is not practical with 62 bit combinatio
ns.
Thanks,
Alan Richard
NASA Glenn Research Center
Cleveland, Ohio
<><><><><><><><><><><><><><><><><><><><><>
Historical, though non-PC, quote of the day:
"We have staked the whole future of America's civilization,
not upon the power of government, far from it.
We have staked the future of all our political institutions
....upon the capacity of each and all of us to govern ourselves
according to the Ten Commandments of God." - James Madison