bas7qck.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
FOR...NEXT Statement
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
FOR counter = start TO end [STEP increment]
    [statementblock]
[EXIT FOR]
    [statementblock]
NEXT [counter [,counter]...]
 
    ■ counter          A numeric variable used as the loop counter.
    ■ start and end    The initial and final values of the counter.
    ■ increment        The amount the counter is changed each time
                       through the loop.
    ■ EXIT FOR         An alternative exit from a FOR...NEXT loop.
                       Transfers control to the statement following NEXT.
 
See Also    DO...LOOP    WHILE...WEND