qck.hlp (Table of Contents; Topic list)
FOR...NEXT Statement
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 Repeats a block of statements a specified number of times.
 
    FOR counter = start TO end [STEP increment]
         [statementblock]
         [EXIT FOR]
         [statementblock]
    NEXT [counter [,counter]...]
 
    ■ counter         Numeric variable used as the loop counter; cannot be
                      an array or record element
 
    ■ start           Initial value of counter
 
    ■ end             Final value of counter
 
    ■ STEP increment  Amount counter is changed each time through the loop;
                      if STEP is omitted, increment defaults to one
 
    ■ statementblock  One or more valid statements on one or more lines
 
    ■ EXIT FOR        Alternative exit from FOR...NEXT loop; transfers
                      control to the statement following the NEXT keyword
 
 See Also
    DO...LOOP Statement              Loops and Decision Structures
    WHILE...WEND Statement