Programming instructions

43
Intermec Fingerprint 6.13 – Programmer's Guide
5. FINGERPRINT PROGRAMMING, cont'd.
11. Execution
Note:
For program instructions you can usually
use upper- or lowercase characters at
will , i.e. “NEW” and “new” will work the
same way.
1
/. For a working two-way communi-
cation, three conditions must be fulfilled:
• Serial communication
• Std IN channel = Std OUT channel
• Verbosity on
To start the execution of the program currently residing in the
printer's working memory, issue a RUN statement in the Immediate
Mode, i.e. without a preceding line number. By default, the program
will be executed in ascending line number order – with the
exception of possible loops and branches – starting from the line
with the lowest number, but you can optionally start the execution
at a specified line.
You can also execute a program that is not LOADed.
If a program has been written without line numbers, the lines will
be numbered 10-20-30-40-50.... etc.
The first program or hardware error that stops the execution will
cause an error message to be returned to the screen of the host,
provided there is a working two-way communication
1
. In case of
program errors, the number of the line where the error occurred will
also be reported by default, e.g. “Field out of label in line 110”.
After the error has been corrected, the execution must be restarted
by means of a new RUN statement, unless a routine for dealing with
the error in question is included in the program.
For demonstration purposes, we will now:
write a short program without line numbers,
execute it,
and finally list it.
NEW
Ok
IMMEDIATE OFF
Ok
REM This is a demonstration program
PRINT "This is the main program"
GOSUB sub1
END
sub1: PRINT "This is a subroutine":' Line label
RETURN
IMMEDIATE ON
Ok
RUN
yields:
This is the main program
This is a subroutine
Ok
LIST
yields:
10 REM This is a demonstration program
20 PRINT "This is the main program"
30 GOSUB SUB1
40 END
50 SUB1: PRINT "This is a subroutine" : ' Line label
60 RETURN
Standard Error-Handling
Also see:
Chapter 16.1