User Tools

Site Tools


en:for

This is an old revision of the document!


For / Next (Statement)

Format

for variable = start_expr to stop_expr [ step step_expr ]
(tab)statement(s)
next variable

Description

The FOR and NEXT commands are used in conjunction to execute a command or group of commands a specified number of times. When the FOR command is first encountered, the variable is set to start_expr.
After each NEXT command, variable is incremented by 1 (the default), or by step_expr if the optional STEP is used, until the variable is greater than or equal to stop_expr for positive step values, or less than or equal to stop_expr for negative step values.

See Also

en/for.1470625219.txt.gz · Last modified: 2020/02/28 10:46 (external edit)