Repeat...Until loops | |||
|
The final type of loops to be discussed are Repeat...Until loops. They work in a slightly different way to the previous types of loops and their format is:
The way this type of loop works is that the code inside the loop will be executed until the value of the expression is true. Specifically what happens is this; the loop starts and the code inside it is executed. At the end of the loop, the value of the expression is calculated and if it is false, the program returns to the start of the loop. If the value of the expression is true, the program will continue to the line after the end of the loop. The important differences of this type of loop is that the inner code sequence will always be executed the first time round the loop, and the loop exits when the value of the expression reaches true. Some examples of using Repeat...Until loops: There is also the command Forever which you can use in place of the loop expression. This will make the loop an endless one (the same as using "Until 0") which never exits unless you use some of the commands described in the next few sections.
| |||
|
Installation | Troubleshooting | Programming | Archives | Links Page last modified: 6th February 2002 |