EasyManua.ls Logo

Commodore VIC-20 - Logical Operators

Commodore VIC-20
308 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
LOGICAL
OPERATORS
'
Logical
operators
perform
tests
on
multiple
relations,
bit
manipulation,
or
Boolean
operations.
The
logical
operator
returns
a
bitwise
resuit
which
is
either
'true11
(not
zero)
or
"false"
(zero).
In
an
expression,
logical
operations
are
performed
after
arithmetic
and
relational
operations.
The
outcome
of
a
logical
operation
is
determined
as
shown
in
the
following
table.
The
operators
are
listed
in
order
of
precedence.
not
,
X
NOT
X
1
0
,
0
1
|
AND
[
1
1
0
0
Y
1
0
1
0
X
AND
Y
1
0
0
0
OR
X
1
1
c
c
Y
1
0
1
0
X
OR
Y
1
1
1
0
!
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.
For
example:
IF
D<200
AND
F<4
THEN
80
IF
l>10
OR
K<0
THEN
50
IF
NOT
PTHEN
100
68
I
I

Other manuals for Commodore VIC-20

Related product manuals