
1.9.3
Loqieal
Opera~ors
Logical opera~ors perform tes~s on multiple
relations,
bit
manipulation,
or
Boolean operations.
The logical operator
returns a bitwise result which is either "true"
(not
zero)
or "false"
(zero).
In an expression, logical operations are
performed after a:ithmetic and relational
operations.
The
outcome of a logieal operation is de~ermined
as
shown in the
following table.
The
operators
are
listed
in
order
of
precedence.
NOT
X
NOT X
1
0
0
1
AND
X
y
X AND
y
1
1
1
1
0
0
0
1
0
0
0
0
OR
X
Y
X OR Y
1
1
1
1
0
1
0
1
1
0
0
0
XOR
X
Y
X XOR Y
1
1
0
1
0
1
0
1
1
0
0
0
IMP
X
Y
X
IMP
Y
1
1
1
1
0
0
0
1
1
0
0
1
EQV
X
Y
X
EQV
y
1
1
1
1
0
0
0
1
0
a
a
1
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 decision
(see IF, Section 2.26).
For
Summary of Contents for Basic Interpreter Basic 80
Page 1: ...5IA iC intc tit tcl c t ...
Page 2: ......
Page 6: ... ...
Page 10: ......
Page 26: ......
Page 33: ...2 5 Intentially left blank ...
Page 37: ...BASIC SO COMMANDS AND STATEMENTS 2 9 Intentially left blank ...
Page 112: ......
Page 136: ......
Page 140: ......
Page 160: ......
Page 165: ......
Page 166: ......
Page 174: ......
Page 176: ......
Page 182: ......
Page 184: ......
Page 190: ......