WHILE/WEND

Format

WHILE condition
WEND

Description

This statement will execute those statements which are between the WHILE and the WEND statements as long as the "condition" is true. The operand "condition" is one of the following:
          number1 > number2        number1 >= number2
          string1  > string2       string1  >= string2
          number1 = number2        number1 <> number2
          string1  = string2       string1  <> string2
          number1 < number2        number1 <= number2
          string1  < string2       string1  <= string2

Example

PRINT "PRESS A KEY TO CONTINUE" A$=""
WHILE A$=""
     A$=INKEY$
WEND
In this example, the program will pause until the user presses a key. WHILE statements may be nested 25 levels deep.