Vector Basic Interpreter Basic 80 Reference Manual - page 108
•
[
To execute a series of statements in a
loop
as
long as a given condition is true.
If
statements> are executed until the WEND statement is encountered. BASIC then returns to the WHILE statement and checks If it is still true, the process is repeated. If it is not true, execution resumes with the statement following the WEND statement. WHILE/WEND loops may be nested to any level. Each WEND will match the most recent WHILE. An unmatched WHILE statement causes a "WHILE without WEND" error, and an unmatched WEND statement causes a "~ieNDwithout WEILE n er~or. 90 'SUBBLE SORT ARRAY A$ 100 FLIPS-1 'FORCE ONE PASS 110 WHILE FLIPS 115 FLIPS-O 120 FOR I-1 130 TO J-1 IF A$(I»A$(I+1) THEN SWAP A$(I),A$(I+1):FLIPS-1 140 150 WEND