Table of Contents

ugBASIC User Manual

WHILE...WEND ✓

SYNTAX

   WHILE [expression] : ... : WEND
   WHILE [expression]
     ...
   WEND

PURPOSE

This instruction define a conditional loop, or a list of statements that will be executed while an expression is true. WHILE acts as the starting position while WEND as the ending one. This command provides a convenient way of making the program repeat a group of instructions all the time a particular condition is true. The condition is checked again at every turn of the loop, until it is no longer true.

EXAMPLE

  WHILE alive : score = score + 1 : WEND

See also the following example files:

ABBREVIATION

 Wh...We

AVAILABLE ON

ANY PROBLEM?

If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please open an issue for this keyword on GitHub. Thank you!

POWERED BY