LOOP - QB64 Wiki

LOOP

From QB64 Wiki

Jump to: navigation, search

The LOOP statement denotes the end of a DO...LOOP where the program jumps to the beginning of the loop if the optional condition is true.


Contents

Syntax

DO
.
.
.
LOOP [{UNTIL|WHILE} condition]


  • LOOP indicates the bottom or end of a DO...LOOP block of code.
  • Either the DO statement or LOOP statement can set a condition to end the loop.
  • When a loop uses a LOOP condition, the code inside of it will run at least ONCE.
* A WHILE condition continues the loop until the condition is false.
* An UNTIL condition continues the loop until the condition is true.
* If only DO and LOOP are used the loop will never end! Ctrl-Break can be used to stop an endless loop!


See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page
Personal tools