Keyword To - leonard-thieu/monkey GitHub Wiki

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 ] IndexVariable = FirstValue To LastValue [ Step StepValue ]    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