FOR
|
Syntax: |
FOR <Variable> = <Start> TO <End> [STEP
<Step>] ... Instructions ... ENDLOOP
|
||||||||
|
|
|
||||||||
|
Meaning: |
Executes a serial of instructions in a loop,
beginning at <Start> with the step width <Step> until
<End>. FOR loops can be nested any number of times. However,
it is important that different run variables are used. Every instruction
ENDLOOP refers to the innermost, not yet closed loop. If <Start> is bigger than <End>, the
loop is not executed. <Step>
can also be negative. |
||||||||
|
Parameter: |
|
||||||||
|
Sample: |
DIM FIELD(100,20) FOR I% = 1 TO 100 FOR
J = 1 TO 20 STEP
2 FIELD(I%,J) = I% *
1000 + J ENDLOOP ENDLOOP |
||||||||
|
See also: |
|