EasyManua.ls Logo

Commodore Plus 4 - Page 52

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...
40
The
BASIC
Language
EXIT
Abbr.
exl
Terminates
a
DO
...
LOOP
conditional
command
sequence.
You
cannot
use
EXIT
with
other
commands,
including
IF
...
THEN
...
ELSE
sequences.
See
DO.
EXP
Abbr.
eX
EXP
(number)
Numeric
function
that
finds
the
value
of
the
mathematical
constant
e
(approx
imately
2.71828183)
raised
to
the
power
in
parentheses.
To
find
exponentials
of
other
numbers,
use
the
up
arrow
symbol.
Parameter:
any
numeric
expression
Example:
PRINT
EXP(-1)
Displays
the
reciprocal
of
e.
.367879441
FOR
...
TO
...
STEP
...
NEXT
Abbrs.
fO/to/stE/nE
FOR
variable
=
start
value
TO
end
value
STEP
increment
commands
NEXT
variable,
variable,
etc.
Creates
a
loop
to
repeatedly
execute
all
commands
between
the
FOR
com
mand
and
the
NEXT
command.
The
loop
repeats
until
the
counter
variable
in
the
FOR
command
equals
or
exceeds
the
value
of
the
ending
point.
If
you
omit
the
optional
STEP
command,
the
FOR
counter
is
incremented
by
1
each
time
the
loop
executes.
You
can
use
STEP
to
increment
the
counter
by
any
number.
For
example,
you
can
use
a
STEP
increment
of 25
to
draw
a
shape
repeatedly,
each
time
tilted
25
degrees
more.
You
can
also
use
STEP
to
count
backwards
by
specifying
a
negative
number.
Parameters:
FOR
counter
variable
=
starting
point
TO
ending
point
STEP
increment
commands
NEXT
counter
variable
1.
The
FOR
command
contains
a
variable
whose
value
is
updated
each
time
the
loop
is
executed.
The
FOR
command
also
contains
the
starting
and
ending
points
for the
number
of
times
the
loop
will
execute.
The
starting
and
ending
points
can
have
any
value,
including
variables.
If
the
starting
point
is
higher
than
the
ending
point,
you
normally
include
a
negative
STEP
value.
2.
The
STEP
clause,
which
is
optional,
tells
the
computer
how
much
to
add
to
the
current
value of
the
counter
each
time
the
NEXT
command
sends
execution
back
to
the
FOR
command.
The
default
value
is
1.

Other manuals for Commodore Plus 4

Related product manuals