AT&T 6300 Programmer's Manual page 499

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

Syntax
condition
loop
Remarks
WHILE ... WEND
Statements
Loop through a series of statements as long as
a given condition remains true.
WHILE condition loop statements WEND
is a numeric, relational or logical expression. GWBASIC
determines whether the condition is true or false by testing
the result of the expression for non zero and zero, respec-
tively. A non zero result is true and a zero result is false.
Because of this, you can test whether the value of a variable
is non zero or zero by merely specifying the name of the
variable as a condition.
statements are executed until a WEND statement is
encountered
If
"condition" is not zero (i.e., true), "loop
statements" are executed until the WEND
statement is encountered. GWBASIC then
returns to the WHILE statement and checks
"condition". If it is still true, the process is
repeated. If it is zero (i.e. false), 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 "WEND without WHILE"
error.
Do not direct program flow into a
WHILE/WEND loop without entering
through the WHILE statement.
7-343

Advertisement

Table of Contents
loading

Table of Contents