Intermec PC23d Fingerprint Developer's Guide (PC23d, PC43d/t, PM23c, PM43, PM4 - Page 26

Programming Without Line Numbers, Sending Programs to the Printer

Page 26 highlights

Chapter 2 - Understanding Fingerprint Syntax In this manual, the programming examples will generally have line numbers in order to make them easier to understand. For more complex programs, programming without line numbers may be both easier and quicker as described in the next section. Programming Without Line Numbers To write program lines without manually entering line numbers, send the IMMEDIATE OFF command first. Then you can write the program line by line without having to type a line number at the start of each line. In other respects, you can generally work just as when using line numbers. To make the execution branch to a certain line, such as a GOTO statement, the line to branch to must start with a line label, which is a string of characters appended by a colon (:). The line label must not start with a digit or interfere with any keywords reserved by Fingerprint. To branch to a line marked with a line label, just enter the line label (without the colon). Finish the program by sending an IMMEDIATE ON command before you RUN it. The lines will automatically be numbered 10-20-30-40-50, and so on, but the line numbers are not visible until you LIST the program. Line labels are not replaced by line numbers. The next example shows how line labels are used in a simple program: IMMEDIATE OFF GOSUB Q123 END Q123:SOUND 440,50 RETURN IMMEDIATE ON RUN If you next send the LIST command, Fingerprint automatically adds the line numbers: 10 GOSUB Q123 20 END 30 Q123: SOUND 440,50 40 RETURN Sending Programs to the Printer Each time a command line or program line is sent to the printer, the line is checked for possible syntax errors. Note: If verbosity is on, the printer returns either "Ok" or an error message. There are three main methods of writing and transmitting a program to the printer: • One line at a time. If you have a "non-intelligent" terminal that can only transmit and receive ASCII characters, you must write and send each line separately. All lines must include line numbers. To correct a mistake, you must rewrite the complete line using the same line number. 14 Fingerprint Developer's Guide

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163

Chapter 2 — Understanding Fingerprint Syntax
14
Fingerprint Developer’s Guide
In this manual, the programming examples will generally have line numbers in
order to make them easier to understand. For more complex programs,
programming without line numbers may be both easier and quicker as described in
the next section.
Programming Without Line Numbers
To write program lines without manually entering line numbers, send the
IMMEDIATE OFF command first. Then you can write the program line by line
without having to type a line number at the start of each line. In other respects, you
can generally work just as when using line numbers.
To make the execution branch to a certain line, such as a GOTO statement, the line
to branch to must start with a line label, which is a string of characters appended by
a colon (:). The line label must not start with a digit or interfere with any keywords
reserved by Fingerprint. To branch to a line marked with a line label, just enter the
line label (without the colon).
Finish the program by sending an IMMEDIATE ON command before you RUN it.
The lines will automatically be numbered 10-20-30-40-50, and so on, but the line
numbers are not visible until you LIST the program. Line labels are not replaced by
line numbers.
The next example shows how line labels are used in a simple program:
IMMEDIATE OFF
GOSUB Q123
END
Q123:SOUND 440,50
RETURN
IMMEDIATE ON
RUN
If you next send the LIST command, Fingerprint automatically adds the line
numbers:
10
GOSUB Q123
20
END
30
Q123: SOUND 440,50
40
RETURN
Sending Programs to the Printer
Each time a command line or program line is sent to the printer, the line is checked
for possible syntax errors.
There are three main methods of writing and transmitting a program to the printer:
One line at a time. If you have a “non-intelligent” terminal that can only
transmit and receive ASCII characters, you must write and send each line
separately. All lines must include line numbers. To correct a mistake, you must
rewrite the complete line using the same line number.
Note:
If verbosity is on, the printer returns either “Ok” or an error message.