EasyManua.ls Logo

Laser 128 - For

Laser 128
255 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 COMMANDS AND
STATEMENTS
The
value
of
i
can
also
be
negative
,
in
which
case
it
is
as
though
m
and
n
are
exchanged
for
their
positive
roles.
In
other
words,
n is
greater
than
m,
and
the
counter
is
reduced
each
time
through
the
loop
until
n is less
than
m.
FOR
. . .
NEXT
loops
c~n
be
written
inside
each
other,
or
nested.
In
these
cases,
the
variable
name
s
must
be
different,
and
each
FOR
must
be
matched
with
its
corresponding
NEXT.
Alternatively,
one
NEXT
can
serve
a
number
of
FORs,
when
it
is
given
as
NEXT
variab
le/
,
variable2, variable3
etc
.
Examples:
]
10
FOR
N = 2
TO
100
STEP
2
] 20
PRINT
N/ 2
] 30
NEXT
This
would
pdn
t
out
the
number
s
from
1
to
50.
] 100
FOR
N = I
00
TO
2
STEP
-
2
] I
IO
PRINT
N/ 2
] 129
NE
XT
This
would
also
print
out
the
numbers
between
I
and
50,
but
in
reverse
order
to t
he
first
examp
le.
Il-41

Table of Contents