38
CipherLab BASIC Programming Part I
WHILE … WEND
Purpose To repeat the execution of a block of statements whil
TRUE.
Syntax WHILE condition
[Statement Block]
WEND
Remarks If the “condition”
is true, loop statements are executed until the WEND
statement is encountered. Then the program execution returns to the WHILE
statement and checks
the condition again. If it is still true, the process will be
repeated. Otherwise, the execution continues with the statement following the
WEND statement.
Example
WHILE TRANSACTION_COUNT > 0
Data$ = GET_TRANSACTION_DATA$(1)
WRITE_COM(1, Data$)
DEL_TRANSACTION_DATA(1)