bas7qck.hlp (Table of Contents; Topic list)
BASIC Logical Operators
  Expressions and Operators                    Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Logical Operators
 
The six logical operators in BASIC, listed in order of precedence, are
as follows:
 
  Operator              Meaning
  NOT                   Bit-wise complement
  AND                   Conjunction
  OR                    Disjunction (inclusive "or")
  XOR                   Exclusive "or"
  EQV                   Equivalence
  IMP                   Implication
 
Logical operators perform tests on multiple relations, bit manipulations, or
Boolean operations and return a true (nonzero) or false (zero) value to be
used in making a decision.
 
In an expression, logical operations (also known as Boolean operations) are
performed after arithmetic and relational operations. Operands are converted
to integers (or, if necessary, long integers) before the logical operation
is done. The operands of logical operators must be in the range
-2,147,483,648 to 2,147,483,647 (if the operands are not in this range, an
error results.) If the operands are either 0 or -1, logical operators
return 0 or -1 as the result.
 
See Also    Truth Table
            Example