Do-Loop StatementEdit


Basically it goes in a loop forever, the DoEvents prevents it from hanging and the render could mean to render the game graphics.

Do-Loop statements mean to execute code inside it forever.

Do-Until-Loop StatementEdit

Do Until loops execute code until the condition is met

Do Until EOF(FB)
    Line Input #FB, LineData

This means it will read lines into LineData until it hits the end of the file.


The Do-While statement is shown in the While page.

The position of the condition in the loop is important. It can either be placed on the line with the Do or with the Loop. When it is at the beginning of the loop, the condition is checked first and then if it passes, the contents of the loop are executed. If it is at the end of the loop then the contents of the loop will always be executed at least one time.

Flow Control
If | For | While | Do | Until