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.

ON ERROR GOTO<br />

Chapter —Program Instructions<br />

Purpose Statement for branching to an error-handling subroutine when an error<br />

occurs.<br />

Syntax ON ↔ ERROR ↔ GOTO|<br />

is the number or label of the line to which the program should<br />

branch when an error condition occurs.<br />

Remarks If any kind of error condition occurs after this statement has been encountered,<br />

the standard error-trapping routine will be ignored and the program<br />

will branch to the specified line, which should be the first line in an errorhandling<br />

subroutine.<br />

If the line number is 0, the standard error-trapping routine will be enabled<br />

and no error-branching within the current program will be executed.<br />

Examples If you try to run this example with the printhead raised (or if any other<br />

error occurs), a warning signal will sound and the error LED will be<br />

lighted.<br />

10 LED 0 ON:LED 1 OFF<br />

20 ON ERROR GOTO 1000<br />

30 FONT "Swiss 721 BT"<br />

40 PRTXT "HELLO"<br />

50 PRINTFEED<br />

60 END<br />

. . . . .<br />

1000 LED 0 OFF:LED 1 ON<br />

1010 FOR A%=1 TO 3<br />

1020 SOUND 440,50<br />

1030 SOUND 359,50<br />

1040 NEXT A%<br />

1050 RESUME NEXT<br />

The same example written without line numbers would look like this:<br />

IMMEDIATE OFF<br />

LED 0 ON:LED 1 OFF<br />

ON ERROR GOTO QQQ<br />

FONT "Swiss 721 BT"<br />

PRTXT "HELLO"<br />

PRINTFEED<br />

END<br />

. . . . .<br />

QQQ: LED 0 OFF:LED 1 ON<br />

FOR A%=1 TO 3<br />

SOUND 440,50<br />

SOUND 359,50<br />

NEXT A%<br />

RESUME NEXT<br />

IMMEDIATE ON<br />

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

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

Saved successfully!

Ooh no, something went wrong!