Programming instructions
33
Intermec Fingerprint 6.13 – Programmer's Guide
5. FINGERPRINT PROGRAMMING, cont'd.
4. Programming Mode,
cont'd.
DELETE
Program lines can be removed using the DELETE statement in the
Immediate Mode. Both single lines and ranges of lines in consecu-
tive order can be deleted.
RENUM
The program lines can be renumbered, e.g. to provide space for new
program lines, to change the order of execution, or to make it
possible to MERGE to programs. Line references for GOSUB,
GOTO and RETURN statements will be renumbered accordingly
(see chapter 5.6 – 5.8 ).
Conditional instructions control the execution according to whether
a numeric expression is true or false. Fingerprint has one condi-
tional instruction, which can be used in two different ways:
• IF...THEN...[ELSE]
• IF...THEN...[ELSE]...ENDIF
IF...THEN...[ELSE]
If a numeric expression is TRUE, then a certain statement should
be executed, but if the numeric expression is FALSE, optionally
another statement should be executed.
This example allows you to compare two values entered from the
keyboard of the host.
10 INPUT "Enter first value ", A%
20 INPUT "Enter second value ", B%
30 C$="1:st value > 2:nd value"
40 D$="1:st value ≤ 2:nd value"
50 IF A%>B% THEN PRINT C$ ELSE PRINT D$
60 END
RUN
Another way to compare the two values in the example above is to
use three IF...THEN statements:
10 INPUT "Enter first value ", A%
20 INPUT "Enter second value ", B%
30 C$="First value is larger than second value"
40 D$="First value is less than second value"
50 E$="First value and second value are equal"
60 IF A%>B% THEN PRINT C$
70 IF A%<B% THEN PRINT D$
80 IF A%=B% THEN PRINT E$
90 END
RUN
5. Conditional Instructions
☞
TRUE and FALSE
Also see:
• Chapter 4.9 (Relational Operators)