Syntax:
Part | Description |
<CounterVariable> |
Required. This can either be an integer or long variable only. This variable will increment (or decrement) on each iteration of the loop. |
<StartValue> |
Required. The <StartValue> can be either an integer or long variable, or a constant. This is the starting value that the <CounterVariable> will start at. |
<EndValue> |
Required. This is the ending value for the loop. You can use a constant, integer or long variable, or even an expression. This value can be lower than the <StartValue>, but will require a negative <StepValue> (see below). |
<StepValue> |
Optional. The <StepValue> tells the loop how to increment each iteration. The default is Step 1. You can use an integer or long variable, or a constant. If your <EndValue> is smaller than your <StartValue>, you will need a negative Step value. |
Example: