DO...WHILE loop

 DO...WHILE loop

More modern versions of BASIC, like Visual Basic, offer a more flexible DO...LOOP structure. This loop can be configured to test the condition at either the beginning or the end of the loop and can repeat either WHILE a condition is true or UNTIL it becomes true. 
DO WHILE...LOOP
The condition is checked at the beginning. If the condition is initially false, the loop never executes. 
DO WHILE counter <= 10
    ' Code block
    counter = counter + 1
LOOP
Use code with caution.

No comments:

Post a Comment