Last Modified: 1/3/2021
Creates a loop that repeats for the range specified or the Exit command is used.
Name | Type | Required | Description |
CounterVariable | Integer/Long | Yes | This variable gets updated after each loop iteration. |
StartValue | Integer/Long | Yes | This is the value that the loop begins with. |
EndValue | Integer/Long | Yes | This is the value that the loop ends at. |
StepValue | Integer/Long | No | How much to increment the CounterVariable by. If omitted, the compiler defaults the Step counter to 1. |
Syntax: For <CounterVariable> = <StartValue> To <EndValue> [Step <StepValue>] [Statements] [Continue] [Statements] Next |
For x = 1 To 10 Print x Next |