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.

ERL<br />

Chapter —Program Instructions<br />

Purpose Function returning the number of the line on which an error condition has<br />

occurred.<br />

Syntax ERL<br />

Remarks Also useful in connection with an ON ERROR GOTO statement.<br />

Examples You can check at which line the last error since power up occurred like<br />

this:<br />

PRINT ERL<br />

yields for example<br />

40<br />

In this example, the line number of the line, where an error has occurred,<br />

decides the action to be taken (in this case the font size is too large for the<br />

label width):<br />

10 ON ERROR GOTO 1000<br />

20 FONT "Swiss 721 BT",100<br />

30 PRTXT "HELLO EVERYBODY"<br />

40 PRINTFEED<br />

50 END<br />

1000 IF ERL=40 THEN PRINT "PRINT ERROR"<br />

1010 RESUME NEXT<br />

RUN<br />

yields:<br />

PRINT ERROR<br />

You can use the ERL function in programs without line numbers too,<br />

because such programs have automatically generated hidden line numbers<br />

that are revealed when the program is LISTed. This is the same program as<br />

above but without line numbers:<br />

NEW<br />

IMMEDIATE OFF<br />

ON ERROR GOTO QAAA<br />

FONT "Swiss 721 BT",100<br />

PRTXT "HELLO EVERYBODY"<br />

PRINTFEED<br />

END<br />

QAAA: IF ERL=40 THEN PRINT "PRINT ERROR"<br />

RESUME NEXT<br />

IMMEDIATE ON<br />

RUN<br />

yields:<br />

PRINT ERROR<br />

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

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

Saved successfully!

Ooh no, something went wrong!