|Top Previous Next|
The For statement contains a block of commands that are executed as a property is increased or decreased until it reaches a terminating condition. The initial and final values of the property are specified, as well as the incremental step value. The For statement always concludes with an End statement. For more information, see the Flow Control Script Reference.
•All commands between For and End are executed for each increment or decrement of the property.
•The "step" keyword is used with the For command to specify the increment size; this can be positive, negative, or omitted entirely for the loop to assume an increment of +1. If the iterator is a TimeSpan value, the assumed increment is +1 day.
•The fourth example shown above will increment mySpacecraft.A by myVariable, beginning at 7000 and ending at 8000.
oThe "with reset" keywords can be used to force these properties and methods to reset their state at the start of each iteration of a For loop as shown in the fifth example above.
•In millisecond timing precision mode, properties and methods with a state are automatically reset at the start of each iteration of a For loop.
oThe "without reset" keywords can be used to prevent the state from being reset.
Value to Change
•Flow Control Script Reference