not
not
not is a logical-complement operator
syntax
details
the not logical-complement operator evaluates the numeric expression and returns its complement. See the table below.
expression result true false false true
Logical operators are not to be confused with Bitwise Operators.
example
In this example a conjunction comparison is performed on two integer variables using an if-statement.
' SharpBASIC not programming example
' ----------------------------------
incl "lib/sys.sbi";
dim a, b: int;
main do
a = 1;
b = 0;
if not (a and b) do
print(true);
else do
print(false);
end
end
Output:
-1
not.txt · Last modified: 2023/06/26 10:41 by admin