EasyManua.ls Logo

Apple IIe - Page 132

Apple IIe
320 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...
132
Apple
lie
Users
Handbook
Configuration
expression 1
OR
expression 2
expression 1
and
expression
2 are Boolean expressions. If
the
expression
is
numeric
(non-zero),
it
xviii
be
evaluated
to
true.
A
zero
is
treated
as
false. A
truth
table
for
OR
is
illustrated
below.
x
y
XORY
true true true
true
false
true
false
true true
false
false false
In
both
Applesoft
and
Integer
BASIC, a
true
is
represented
by
a 1
and false
by
a
0.
10 A
=3
20
B = 5
Example
30
IF
(B
< A)
OR
(B
=
5)
THEN
50
40
END
50
PRINT "EITHER
BIS
LESS
THAN
A"
60
PRINT
"ORB
IS
EQUAL
TO
5"
70
END
]RUN
[Ret]
EITHER
BIS
LESS
THAN
A
OR
B
IS
EQUAL
TO
5
In
the
preceding
example
, Bis
not
less
than
A,
but
Bis
equal
to
5.
Therefore,
the
whole
OR
expression
is
true,
and
the
program
branches
to
line
50.

Other manuals for Apple IIe

Related product manuals