EasyManua.ls Logo

Commodore VIC-20 - Page 85

Commodore VIC-20
404 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...
10/2
6400/4
A/B
4E2/XR
Chapter
3:
Programming
the
VIC
20
Computer
71
results in 5
results in
1600
results in the floating point
number assigned
to
variable
A being divided by
the floating point number
assigned
to
variable B
results in 400 being divided
by the floating point number
represented by label
XR
The third example,
AI
B,
can duplicate the first
or
second examples,
even though A and B represent floating point numbers. The integer numbers
would be held in floating point form, however.
A%I
B%
could exactly
duplicate either of the first two examples.
Exponentiation
(t).
The up arrow specifies that the operand on the left
of
the arrow
is
raised to the power specified by the operand on the right
of
the arrow.
If
the
data
(or operand) on the right is
2,
the number on the left is
squared;
ifthe
data
(or operand)
on
the right
is
3,
the number on the left
is
cubed; and so on. The exponent can be any number, variable, or expression,
as long as the exponentiation yields a number in the allowed floating point
range. For example, .
212
1212
11 3
A
15
216.4
NM
I
-10
141 F
results in 4
results in
144
results in 1
results in the floating
point number assigned
to
variable A being
raised
to
the 5th power
results in 84.4485064
results in the floating
point number assigned
to
variable
NM
being
raised
to
the negative
10th power
results in
14
being raised
to
the power specified
by floating point variable F
ORDER
OF
EVAWATION
An expression may have multiple arithmetic operations, as in the
following statement.

Other manuals for Commodore VIC-20

Related product manuals