EasyManua.ls Logo

Apple IIe - Page 55

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...
Applesoft
BASIC
Programming
55
fourth
and
fifth
are examples
of
relational
and Boolean expres-
sions respectively.
Each
of
these types
of
expressions
will
be
discussed
in
detail
in
the
following
sections.
The sign
or
phrase
describing
the
operation
to
be
undertaken
is
known
as
the
operator.
The operators in
our
previous example
were
as
follows:
+
+
*
<
AND
The constants
or
variables
which
are affected,
by
the
operator
are
known
as
operands.
Compound Expressions and
Order
of
Evaluation
All
of
our
preceding
examples
were
simple expressions.
A simple
expression
is
one
which
contains just
one
operator
and
one
or
two
operands. Simple expressions can
be
combined
to
form
compound
expressions
.
The
following
are
examples
of
compound
expressions.
(A+B)*7-4
(A+
B)
AND
(C + D)
IF
A=
1ANDB=1THENC=1
With
compound
expressions,
it
is
necessary
that
the
computer
knows
which
operation
should
be
undertaken
first.
Applesoft
BASIC
follows
a standard
order
of
evaluation
within
compound
expressions. This
order
is
outlined
in
Table
3-1
.
Note
that
parentheses have
the
highest
precedence
level.
In
other
words,
any
expression
enclosed
within
parentheses
will
be
evaluated first.
If
more
than
one
set
of
parentheses appears
in
an
expression, these
will
be evaluated
from
left
to
right.
One
pair
of
parentheses can
be
used
to
enclose an
operator
enclosed
within
another
set.
In
such an instance,
Applesoft

Other manuals for Apple IIe

Related product manuals