FOR

FOR Variable = Expression TO Expression [ STEP Expression ] ... NEXT

Repeats a loop while incrementing a variable. Note that the variable must be :

Example :

DIM I AS Integer

FOR I = 1 TO 20 STEP 3
  PRINT I;
NEXT

PRINT

=> 1 4 7 10 13 16 19


Referenced by :