Fandom

Visual Basic Wiki

Do

70pages on
this wiki
Add New Page
Talk0 Share

Do-Loop StatementEdit

Do
  DoEvents
  Render
Loop

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
Loop

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

NotesEdit

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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.