02.10.2012 Views

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter —Program Instructions<br />

WHILE...WEND<br />

Purpose Statement for executing a series of statements in a loop providing a given<br />

condition is true.<br />

Syntax WHILE <br />

<br />

[...]<br />

WEND<br />

is a numeric expression that is either TRUE (-1) of FALSE (0).<br />

is a statement, or a list of statements on separate lines, that will<br />

be executed provided is TRUE.<br />

Remarks If is TRUE, all following statements will be executed successively<br />

until a WEND statement is encountered. The program execution then<br />

goes back to the WHILE statement and repeats the process, provided<br />

still is TRUE.<br />

If is FALSE, the execution resumes at the statement following the<br />

WEND statement.<br />

WHILE...WEND statements can be nested. Each WEND matches the<br />

most recent WHILE statement.<br />

Example In this example, the WHILE...WEND loop will only be executed if the<br />

character “Y” (ASCII 89 dec.) is entered on the keyboard of the host.<br />

10 B%=0<br />

20 WHILE B%89<br />

30 INPUT "Want to exit? Press Y=Yes or N=No ",A$<br />

40 B%=ASC(A$)<br />

50 WEND<br />

60 PRINT "The answer is Yes"<br />

70 PRINT "You will exit the program"<br />

80 END<br />

RUN<br />

yields:<br />

Want to exit? Press Y=Yes or N=No N<br />

Want to exit? Press Y=Yes or N=No Y<br />

The answer is Yes<br />

You will exit the program<br />

<strong>Intermec</strong> Fingerprint <strong>v8.70.0</strong>/v10.0.0 Programmer´s <strong>Reference</strong> <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!