Futurebasic/Language/Reference/not

Syntax
value = NOT expr

Description
The  operator interprets   as an integer, and returns another integer in whose internal bit pattern all the bits are flipped to their opposite state (i.e., all 1's are changed to 0; and all 0's are changed to 1). Coincidentally, because of the way that integers are stored in FB, the value returned by  equals:.

One common use for  is to reverse the sense of an expression whose value equals   (-1) or   (0). Note that  returns , and   returns. You must be careful when using  with "true" values other than -1. For example:

testValue = 35 IF testValue THEN BEEP 'This produces a beep statement, " " produces the value -36, which is still interpreted as "true" by the  statement.

Another common use for  is to help you set or reset individual bits in a bit pattern. For example:

ÊÊÊpattern&amp; = pattern&amp; AND NOT BIT(7)

This sets bit 7 in  to zero, and leaves all of  's other bits alone.