AT&T 6300 Programmer's Manual page 80

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

Variable Types
3-22
Just as the relational operators can be used to
make decisions regarding program flow,
logical operators can connect two or more
relations and return a true or false value to be
used in a subsequent decision (see "IF"
statements in the Reference Section.)
Example
IF D<200
AND
F<4
THEN
80
IF 1>10
OR
K<O
THEN
50
IF
NOT
P
THEN
100
Logical operators work by converting their
operands to 16-bit, signed, two's complement
integers in the range -32768 to 32767. (If the
operands are not in this range, an error
results.) If both operands are supplied as 0 or
-1, logical operators return 0 or -1. The given
operation is performed on these integers bit-
by-bit; Le., each bit of the result is determined
by the corresponding bits in the two operands.

Advertisement

Table of Contents
loading

Table of Contents