Monkey Documentation

Keyword To

Defines range of values to be assigned to the index variable in a For/Next loop. See For for details and examples.

Syntax

For Local IndexVar := start_value To end_value [ Step constant_value ]
Statements...
Next

Description

The To keyword defines the range of values through which a For/Next loop will iterate.

An alternative keyword in a For/Next loop (rather than To), with a slightly different action, is Until; see For for further details on this.

See also

For | Next