Quote:

in other words, the sample wasn't perfect



Eh? What do you mean? The sample is fine.

Quote:

ruud, when you fix this not operand?



Apart from abending if you don't protect it with parentheses it is fine. What do you think needs fixing?

Don't make the mistake of assuming that a logical or bitwise operation on a single bit sized datum is the same as a bitwise operation on a collection on bits such as a word or byte.

Did you play with NOT using windows calculator? It would have made things much clearer.

The bitwise "~" is a UNARY operator, like the "-" on negative numbers.

Take the byte (8 bit) value 15. The logical NOT 15 is 0, however the boolean ~15 is 240.
15 = 00001111
~15 = 11110000 = 240

Sample failing code:
Code:
"~15 is " ~15 ?


The above code abends with a "unexpected command" error. Wrapping it in parentheses fixes the problem:
Code:
"~15 is " (~15) ?