TSC AUTO ID Technology Co., Ltd. 131 Copyright 2013 All Rights Reserved.
WHILE…WEND
Description
Executes a series of statements as long as a given condition is True. Nested loops are allowed (up to 39
nested loops) in this printer.
Syntax
WHILE condition
[statement]
WEND
Available relational operator: <, >, =, <=, >=, <>
*Relational operator <>, not equal, was supported since V5.10 EZ.
One or more statements executed while condition is True.
Note:
This command has been supported since V5.10 EZ and later firmware.
Example
DOWNLOAD "TEST.BAS"
I=0
TOTAL=0
WHILE I<100
I=I+1
TOTAL=TOTAL+I
WEND
SIZE 4,0.5
GAP 0,0
CLS
TEXT 10,10,"3",0,1,1,"1+2+3+ ... + 100 = " +STR$(TOTAL)
PRINT 1
EOP
TEST
DOWNLOAD "TEST.BAS"
data$ =""
SIZE 4,0.3
GAP 0,0
DIRECTION 1
INPUT "Data:",data$
WHILE data$ <> "Quit"
CLS
TEXT 10,10,"3",0,1,1,"Data: "+data$
PRINT 1
INPUT "Data:",data$
WEND
CLS
TEXT 10,10,"3",0,1,1,"Quit BAS"
PRINT 1
EOP
TEST
12345
67890
quit
Quit