The Repeat Construct

The Repeat construct is a simple statement which executes a piece of code until a certain condition becomes false.

It looks like this....

repeat
...
until condition

The only difference between this and a while construct is that the code is executed before the condition is tested. This means that it will always be executed at least once.

Repeat statements can also be constructed into an infinite loop like this...

repeat
...
forever


Table of contents