for statements
for statements
Scripts support for statements with the following syntax: FOR counter = initialValue TO finalValue STEP stepValue statements NEXT. For statement set counter to initialValue, repeats execution of statement until "next" and increment value of counter by stepValue, until counter reachs finalValue. Step part is optional, and if omitted stepValue is considered 1.
Examples:
SCRIPT 1:
FOR c = 1 TO 10 STEP 2
a = a + c
NEXT
SCRIPT 2:
FOR I = a TO b
j = i ^ 2
sum = sum + j
NEXT