EasyManua.ls Logo

Husky Hunter - Page 316

Husky Hunter
499 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BASIC FUNCTIONS
. SECTION 5. 24
WHILE .. WEND
5.24.2 Function WHILE •••• WEND executes a set of statements if a condition
is true.
Syntax WHILE numeric. expression
statements
WEND
•numeric expression' is evaluated true or false; if the
expression is true the statements following are executed.
If false, the statement after WEND is executed. The loops
may l:>e nested; each WEND associated with the most recent
WHILE.
Examples 10 FOR Q:1 TO 10
20 B(Q):Q
30 NEXT
110 WHILE A< 11
120
FOR I= 1 TO 10
130 PRINT B(I);
140 NEXT
150 PRINT A:A = A+ 1
160 WEND
The matrix B is printed as long as the A parameter is less
than
11.
Remarks Each time WEND is encountered the expression is re-
evaluated. The same precautions should be exercised in
jumping out of this loop as with FOR •••• NEXT loops.
VER. V0'9F
NOTE: WHILE cannot be used with a string expression. The
statements WHILE and WEND must be on separate lines and no
other statements must be on those lines.
PAGE 5 - 147