Case statement question
Don M
Posts: 1,653
For variable d which is a long I cant get the second line to work:
d = $52 for example
I know the first line $0B works fine but the second line doesn't even though the equation does = $40. Maybe I'm stating this wrong? If I use it in an IF statement like this it works:
d = $52 for example
d := serial.rx case d $0B: Do this.... (d & %0_01000000) == $40: Do that...
I know the first line $0B works fine but the second line doesn't even though the equation does = $40. Maybe I'm stating this wrong? If I use it in an IF statement like this it works:
d := serial.rx case d $0B: Do this... if (d & %0_01000000) Do that...
Comments
You could try Depending on what you want to do when the 8th bit is set, you might need to use $40..$7F, $C0..$FF:
I think I'd go with the if ... elseif syntax for this one.
-Phil
Addendum: I suppose this could work:
-P.