HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4- 156
20 WAIT Wait_time !Number of seconds specified by Wait_time
25 WAIT Wait_time+60 !One minute more than specified by Wait_time
30 WAIT !Until user interrupt (control-Y)
WARNINGS OFF
The WARNINGS OFF statement suppresses the warning messages that HP
Business BASIC/XL normally displays. Use WARNINGS ON to return to the
default.
Syntax
WARNINGS OFF
WARNINGS ON
The WARNINGS ON statement allows HP Business BASIC/XL to display warning
messages, as it does by default. This statement is used to deactivate a
WARNINGS OFF statement.
WARNINGS ON
WHILE
The WHILE and END WHILE statements define a loop that repeats until the
numeric expression in the WHILE statement evaluates to FALSE (zero).
Syntax
WHILE
num_expr
[DO] [
stmts
]...END WHILE
Parameters
num_expr
Considered FALSE if it evaluates to zero; TRUE
otherwise. If it is TRUE, the statement or statements
in the loop are executed. If it is FALSE, the statement
following ENDWHILE is executed. Following execution of
the statements in the loop body,
num_expr
is again
evaluated to determine whether the loop body is executed
again.
stmts
Program lines that are executed if
num_expr
is TRUE.
These statement constitute the loop body.
Examples
10 I=50 !Let I be the first number to be printed, 50
20 WHILE I<>0 !If I<>0, execute loop (lines 30 and 40)
30 PRINT I !Print current number, I
40 I=I-1 !Let I be the next number to be printed
50 END WHILE !Return to line 20
99 END
WHILE constructs can be nested.
100 Num_rows=3 !Number of rows in matrix M
110 Num_cols=4 !Number of columns in matrix M
120 Row=1 !Let Row be first row to be printed
130 WHILE Num_rows-Row !BEGIN OUTER WHILE LOOP
140 Col=1 !Let Col be first column to be printed
150 WHILE Num_cols-Col !BEGIN INNER WHILE LOOP
160 PRINT M(Row,Col) !Print one matrix element
165 Col=Col+1 !Let Col be next column to be printed
170 END WHILE !END INNER WHILE LOOP
180 Row=Row+1 !Let Row be next row to be printed
190 END WHILE !END OUTER WHILE LOOP
999 END