EasyManua.ls Logo

Commodore Plus 4 - Page 18

Commodore Plus 4
464 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...
6
The
BASIC
Language
BASIC
solves
compound
mathematical
problems
in
this
order:
First
Priority:
Exponentiation
Second
Priority:
Multiplications
and
divisions
Third
Priority:
Additions
and
subtractions
Fourth
Priority:
Comparison
operations
Fifth
Priority:
Logical
NOTs
Sixth
Priority:
Logical
ANDs
Seventh
Priority:
Logical
ORs
When
a
problem
contains
more
than
one
calculation
from
each
priority
group,
the
problems
of
the
same
priority
are
solved
left
to
right.
Parentheses
override
this
priority
scheme.
BASIC
solves
parts
of a
problem
that
are
enclosed
in
parentheses
before
any
other
parts
of
a
calculation.
Multiple
problems
within
parentheses
are
solved
according
to
the
standard
priority
order.
Problems
can
contain
multiple
sets
of
parentheses,
but
you
must
be
sure
that
the
number
of
left
parentheses
equals
the
number
of
right
parentheses.
When
paren
theses are
nested
within
parentheses, the
calculations
in
the
innermost
set
of
parentheses
are
solved
first.
*
Comparison,
or
Relational,
Operators
BASIC
recognizes
six
symbols
that
are
used
to
compare
two
values.
These
symbols,
which
are
called
either
comparison
operators
or
relational
operators,
are
described
in
Table
1-3.
The
comparison
operators
can
be
used
to
compare
constants,
variables,
numbers,
or
text
strings.
Table
1-3.
Comparison
Operators
>
The
left-side
value
is
greater
than
the
right-side
value.
<
The
left-side
value
is
less
than
the
right-side
value.
=
The
values
are
equal.
<>
or
><
The
values
are
not
equal.
=>
or
>=
The
left-side
value
is
equal
to
or
greater
than
the
right-side
value.
<=
or
=<
The
left-side
value
is
less
than
or
equal
to
the
right-side
value.
Logical
Operators
You
can
also
use
logical
operators
in
calculations
and
in
comparisons
of
values.
There
are
three
logical
operators:
AND,
OR,
and
NOT.
These
operators
are
also

Other manuals for Commodore Plus 4

Related product manuals