FOR-TO-STEP-NEXT

Syntax:

FOR counter# = start# TO end# |STEP steps#|
    ...
NEXT

Loops the code between FOR and NEXT. The value of counter# is set to start# at the first loop. With every pass of the loop counter# will be de/increased by steps#. If setps# is not set, steps#=1. The code will be looped until counter# is not in the range of [start#; end#] anymore.

Sample:

FOR i=0 TO 10 STEP 2
    PRINT i, 100, 32*i
NEXT

SHOWSCREEN
MOUSEWAIT