Specifications

Example:
To
increase variable I in increments
of
2 between 1 and 10.
FOR
1=1
TO
10
STEP
2
\
NEXT
1
To
reduce variable A in increments
of
0.5 between 50 and
1.
FOR
A=50
TO 1
STEP-0.5
~
NEXT
A
To
increase variable P in increments
of
1 between Q and R.
FOR P
=0
TO R
\
NEXT
P
* When increase
is
performed in increments
of
1,
"STEP"
may
be
omitted.
* Nesting
Up
to
4
FOR-NEXT
loops
can
be
stacked. This stacking
is
called
"nesting".
0=········
.. ···
..
,---
FOR A = .
_
...
FOR
B=··
..
··········:
FOR
C=···············
r
FOR
lNEX~
D
NEXT
C
NEXT
B
---
--NEXT
A
This shows 4-stack nesting.
When nesting
is
performed in this manner,
attention
must
be
paid
to
the
NEXT
statement and its variable which correspond
to
the
FOR statement.
-50-