You are here: start » ppl » statements » for_next

FOR ... NEXT

FOR ... NEXT

Usage:

     FOR VAR = start:integer TO stop:integer [STEP incstep:integer]  
       ...  
     NEXT  

>> * `FOR` - Initializes a loop by assigning "start" to VAR and continuing while VAR <= "stop" (if "incstep" >= 0) or VAR >= "stop" (if "incstep" < 0) (TO is required to separate "start" and "stop". If STEP (optional) is not specified "incstep" defaults to 1)

* `NEXT` - Adds "incstep" to VAR, transfers control to the closest FOR statement, and marks the end of the FOR loop

See also: While…EndWhile, If…Then