Programming instructions
Intermec Fingerprint v7.61 – Programmer’s Reference Manual Ed. 7114
Chapter 2 Program Instructions
GOTO
Field of Application
Statement for branching unconditionally to a specifi ed line.
Syntax GOTO<ncon>|<line label>
<ncon>/<line label> is the number or label of the line to be branched to.
Remarks
If the specifi ed line contains an executable statement, both that statement
and all that follows will be executed. If the specifi ed line does not exist,
an error condition will occur.
The GOTO statement can also be used in the immediate mode to resume
execution of a program, which has been terminated using a STOP statement,
at a specifi ed program line.
Example
In this example the fi rst bar of the tune "Colonel Boogie" will be played only
if the title is entered correctly. Otherwise the message "Try again" will be
displayed until you manage to type the right name.
10 A$="COLONEL BOOGIE"
20 B$="TRY AGAIN"
30 INPUT "TITLE"; C$
40 IF C$=A$ GOTO 100 ELSE PRINT B$
50 GOTO 30
60 END
100 SOUND 392,15
110 SOUND 330,20
120 SOUND 330,15
130 SOUND 349,15
140 SOUND 392,15
150 SOUND 659,25
160 SOUND 659,20
170 SOUND 523,25
180 GOTO 60
RUN
yields:
TITLE?
Note the way GOTO is used in line 50 to create a loop, which makes the
printer await the condition specifi ed in line 40 before the execution is resumed.
Instead of line numbers, line labels can be used following the same principles
as illustrated in the second example for GOSUB statement.