EasyManua.ls Logo

Commodore Plus 4 - Keyboard colors

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...
BASIC
Version
3.5
Commands,
Functions,
and
System
Variables
41
A
negative
STEP
value
decreases
the
value
of
the
counter
variable
each
time
the
loop
is
executed.
(Remember
that
adding
a
negative
value
is
like
subtracting.)
3.
The
commands
that
are
to
be
repeated
during
loop
execution
appear
between
the
FOR
command
and
the
NEXT
command.
4.
The
NEXT
command
tells
the
computer
to
go
back
to
the
FOR
command.
When
the
FOR
command
is
reached
again,
the
STEP
value
is
added
to
the
value
of
the
counter.
When
the
counter
passes
the
ending
point,
the
loop
terminates.
Never
leave
a
FOR
.
.
.
NEXT
loop
with
a
GOTO.
You
can
always
leave
when
NEXT
is
executed
by
setting
the
loop
variable
equal
to
its
ending
point.
Note:
A
FOR...
NEXT
loop
is
always
executed
once.
The
counter
variable
is
updated
before
leaving
the
loop.
The
NEXT
command
can
contain
the
FOR
counter
variable,
but
it
is
not
required.
If
you
are
nesting
loops,
use
the
counter
variable
in
the
NEXT
com
mands
to
avoid
errors.
The
NEXT
command
can
also
contain
a
number
of
counter
variables for
nested
loops.
The
variables
must
be
listed
starting
with
the
innermost
loop
variable
and
ending
with
the
outermost
loop
variable,
therefore,
nesting
rules
are
followed.
Nesting
Multiple
FOR...
NEXT
Loops
You
can
nest
up
to
10
FOR...
NEXT
loops.
Note
the
following
when
you
nest
loops:
The
inner
loop
becomes
part
of
the
outer
loop.
The
inner
loop
must
start
and
end
between
the
beginning
and
ending
of
the
outer
loop.
The
inner
loop
executes
a
full
cycle
from
starting
to
ending
points
each
time
the
outer
loop
executes
once.
Chapter
3
contains
more
information
on
using
loops
in
BASIC
programs.
Examples:
10
FOR
X
=
10
TO
50
STEP
15
SO
PRINT
"X
=";
X
30
NEXT
40
PRINT
"AT
THE
END
OP
THE
LOOP,
X
=";X
RUN
X=
10
AT
THE
END
OF
THE
LOOP,
X
=
55
NEW

Other manuals for Commodore Plus 4

Related product manuals