qb45advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WHILE...WEND Statement Details
◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
WHILE...WEND Statement Details
Syntax
WHILE condition
[statements]
WEND
If the condition is true (that is, if it does not equal zero), then any
intervening statements are executed until the WEND statement is encountered.
BASIC then returns to the WHILE statement and checks condition. If it is
still true, the process is repeated. If it is not true (or if it equals
zero), execution resumes with the statement following the WEND statement.
Note: QuickBASIC's DO...LOOP statement provides a more powerful and
flexible loop control structure.
WHILE...WEND loops may be nested to any level. Each WEND matches the
most recent WHILE. An unmatched WHILE statement causes an error message
that reads "WHILE without WEND." An unmatched WEND statement causes an
error message that reads "WEND without WHILE."
Note: Do not branch into the body of a WHILE...WEND loop without
executing the WHILE. This may cause run-time errors or program
problems that are difficult to locate.