22
CipherLab BASIC Programming Part I
3.3.3 RELATIONAL OPERATOR
Relational operators are used to compare two values. The result of the comparison is
either “True” or “False”. This result may then be used to make a decision regarding
program flow.
=
Equality
A% = B%
Inequality
Inequality
>
Greater than
A% > B!
Less than
Greater than or equal to
Less than or equal to
Logical operators perform tests on multiple relations and Boolean operations. The logical
operator returns a bit-wise result which is either “True” (not zero) or “False” (zero). In an
expression, logical operations are performed after arithmetic and relational operations.
NOT
Logical negation
IF NOT (A% = B%)
Logical and
IF (A% = B%) AND (C% = D%)
Inclusive or
IF (A% = B%) OR (C% = D%)
XOR
Exclusive or
IF (A% = B%) XOR (C% = D%)