DO

Top  Previous  Next

Action

Repeat a block of statements until condition is true.

 

 

Syntax

DO

 statements

LOOP [ UNTIL expression ]

 

 

Remarks

You can exit a DO..LOOP with the EXIT DO statement.

 

 

See also

EXIT , WHILE WEND , FOR , NEXT

 

 

Example

Dim A As Byte

Do                                       'start the loop

 A = A + 1                             'increment A

Print A                               'print it

Loop Until A = 10                         'Repeat loop until  A = 10

Print A                                   'A is still 10 here