Programming instructions
162
Intermec Fingerprint 6.13 – Programmer's Guide
Continued!
TRON/TROFF
Large program can be difficult to grasp. If the program does not
work as expected, it may depend on some programming error that
prevents the program from being executed in the intended order.
The TRON (Trace On) statement allows you to trace the execution.
When the program is run, each line number will be returned on the
standard OUT channel in the order of execution, provided you have
a working two-way communication
1
.
TROFF (Trace Off) disables TRON.
In most application programs, it is useful to include some kind of
error-handler. Obviously, how comprehensive the error-handler
needs to be depends on the application and how independent from
the host the printer will work. In this chapter, we will explain the
general principles and the related instructions, and in chapter 16.4
you will find an example on how an error-handling program can be
composed.
ON ERROR GOTO...
This statement is described in more detail in the chapter 5.8. It is
used to branch the execution to a subroutine if any kind of error
occurs when a program is run. The major benefit is that the program
will not stop, but the error can be identified and dealt with. The
execution can then be resumed at an appropriate program line.
ERR
The ERR function returns the reference number of an error that has
occurred. The actual meaning of the numbers can be found in the
chapter “Error Messages” in the Intermec Fingerprint 6.13 Refer-
ence Manual.
ERL
The ERL function returns the number of the line on which an error
has occurred.
RESUME
This statement is used resume the execution after the error has been
taken care of in a subroutine. The execution can be resumed at the
statement where the error occurred, at the statement immediately
following the one where the error occurred, or at any other specified
line. Also see the chapter 5.8.
16. ERROR-HANDLING, cont'd.
3. Creating an Error-
Handling Routine
1
/. For a working two-way communication,
three conditions must be fulfilled:
• Serial communication
• Std IN channel = Std OUT channel
• Verbosity enabled.
2. Tracing Programming
Errors