17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IF...THEN...(ELSE), <strong>cont'd</strong>.<br />

Chapter 2 Program Instructions<br />

Examples, <strong>cont'd</strong> IF ... THEN are often used in connection with GOTO. In this example, line<br />

numbering is used. Also see the example for the GOTO statement.<br />

10 A%=100<br />

20 B%=50<br />

30 IF A%=B% THEN GOTO 50 ELSE PRINT "NOTEQUAL"<br />

40 END<br />

50 PRINT "EQUAL":END<br />

RUN<br />

yields:<br />

NOT EQUAL<br />

This example correspond to the preceding example, but line labels are used<br />

instead of line numbers.<br />

IMMEDIATE OFF<br />

A%=100<br />

B%=50<br />

IF A%=B% THEN GOTO QQQ ELSE PRINT "NOT EQUAL"<br />

END<br />

QQQ: PRINT "EQUAL":END<br />

IMMEDIATE ON<br />

RUN<br />

yields:<br />

NOT EQUAL<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 101

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

Saved successfully!

Ooh no, something went wrong!