EasyManua.ls Logo

Sharp MZ-800 - Page 49

Sharp MZ-800
221 pages
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...
(3)
Relational
expressions
Relational
expressions
are
used
to
compare
two
values
and
ascribe
a
logical
value
of
either
true
(—
1)
or
false
(0)
to
the
expression
according
to
the
result
of
the
comparison.
The
result
is
used
to
make
a
decision
regarding
subsequent
program
flow,
A
relational
expression
can
consist
of
constants,
varia-
bles,
arithmetic
expressions,
string
connective
expressions
and
relational
operators.
The
table
below
lists
the
relational
operators.
joe
Operate
|
Comparison
Example
|
Equal
to
X=Y
|
<
Less
than
X<Y
|
>
Greater
than
|
X>Y
|
<=,
=<
|
Less
than
or
equal
to
|
X<=Y,
X=<Y
>=,
=>
|
Greater
than
or
equal
to|
X>=,
X=>Y
=
><
|
Not
equal
to
|
x<>Y,
X><Y
Note:
The
relational
values
of
character
data
are
based
on
the
characters’
ASCII
codes.
(4)
Logical
expressions
A
logical
expression
expresses
the
Boolean
sum
or
product
of
true
or
false
values
(—1
or
0)
given
by
relational
expressions.
A
logical
expression
is
formed
of
logical
values,
relational
ex-
pressions
and
logical
operators.
The
following
table
lists
the
logical
operators.
Operator
Meaning
|
Example
|
NOT
Logical
negation
|
NOT
X
|
AND
Logical
product
XWAND
Y
OR
Logical
sum
X.OR
Y
XOR__|
Exclusive
OR
[XcxoryY
|
Note:
Spaces
indicated
by
—.
must
be
included.
5-8

Other manuals for Sharp MZ-800

Related product manuals