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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter —Program Instructions<br />

GOTO<br />

Purpose Statement for branching unconditionally to a specified line.<br />

Syntax GOTO|<br />

/ is the number or label of the line to be branched to.<br />

Remarks If the specified line contains an executable statement, both that statement<br />

and all that follows will be executed. If the specified line does not exist, an<br />

error condition will occur.<br />

The GOTO statement can also be used in the immediate mode to resume<br />

execution of a program, which has been terminated using a STOP statement,<br />

at a specified program line.<br />

Example In this example the first bar of the tune "Colonel Boogie" will be played<br />

only if the title is entered correctly. Otherwise the message "Try again" will<br />

be displayed until you manage to type the right name.<br />

10 A$="COLONEL BOOGIE"<br />

20 B$="TRY AGAIN"<br />

30 INPUT "TITLE"; C$<br />

40 IF C$=A$ GOTO 100 ELSE PRINT B$<br />

50 GOTO 30<br />

60 END<br />

100 SOUND 392,15<br />

110 SOUND 330,20<br />

120 SOUND 330,15<br />

130 SOUND 349,15<br />

140 SOUND 392,15<br />

150 SOUND 659,25<br />

160 SOUND 659,20<br />

170 SOUND 523,25<br />

180 GOTO 60<br />

RUN<br />

yields:<br />

TITLE?<br />

Note the way GOTO is used in line 50 to create a loop, which makes<br />

the printer await the condition specified in line 40 before the execution<br />

is resumed. Instead of line numbers, line labels can be used following the<br />

same principles as illustrated in the second example for GOSUB statement.<br />

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

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

Saved successfully!

Ooh no, something went wrong!