Syntax 1 |
Do {While | Until} condition statements Loop |
Syntax 2 |
Do |
Syntax 3 |
Do |
Description |
Repeats a block of Basic Control Engine statements while a condition is True or until a condition is True. |
Comments |
If the {While | Until} conditional clause is not specified, then the loop repeats the statements forever (or until the script encounters an Exit Do statement). The condition parameter specifies any Boolean expression. |
Examples |
Sub Main() 'This first example uses the
Do...While statement, which performs
Dim a$(100) Sub Main() 'This second example uses the Do
While...Loop, which checks the
Dim a$(100) Sub Main() 'This third example uses the Do
Until...Loop, which does the
Dim a$(100) Sub Main() 'This last example uses the
Do...Until Loop, which performs the
Dim a$(100) |
See Also |
For...Next (statement); While ...WEnd (statement). |
Notes: |
Due to errors in program logic, you can inadvertently create infinite loops in your code. You can break out of infinite loops using Ctrl+Break. |
D |