Intermec PB51 Fingerprint Developer's Guide (old) - Page 60

Converting Input Data

Page 60 highlights

Chapter 4 - Managing Input and Output There are various ways to produce double-byte characters from the keyboard of the computer. By selecting the proper character set using a NASCD statement, the typed-in ASCII values are translated to the corresponding Unicode values, so the desired glyph will be printed. Double-byte fonts and character set tables are available from Intermec. For information, contact your Intermec sales representative. In this example, the text field in line 50 contains both single- and double-byte fonts. The double-byte font and its character set are stored in a Font Install Card. The program yields a printed text line that starts with the Latin character A (ASCII 65 dec.) followed by the Chinese font that corresponds to the address 161+162 dec. in the character set "BIG5.NCD." 10 NASC 46 20 FONT "Swiss 721 BT", 24, 10 30 NASCD "/rom/BIG5.NCD" 40 FONTD "Chinese" 50 PRTXT CHR$(65);CHR$(161);CHR$(162) 60 PRINTFEED RUN Converting Input Data These Fingerprint commands are used to convert data in numeric or string expressions: • ABS returns the absolute value of a numeric expression. • ASC returns the ASCII value of the first character in a string expression. • CHR$ returns the readable character of a specified ASCII value. This is useful when a printer keyboard cannot produce a particular character. • FLOATCALC$ calculates float numbers using arithmetic operators. • FORMAT$ formats a number represented by a string and is typically used with FLOATCALC$. • INSTR searches a string for a specific character or string of characters and returns its position if found. • LEFT$ returns a specified number of characters from the beginning (left end) of a string. • LEN returns the total number of characters and spaces in a string expression. • MID$ returns a portion of a string expression. You can specify the start position and the number of characters to return. • RIGHT$ returns a specified number of characters from the end (right side) of a string. • SGN returns the sign of a numeric expression. • SPACE$ returns a specified number of space characters. This command is useful for creating tables with monospace characters. • STR$ returns the string representation of a numeric expression. 44 Intermec 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
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187

Chapter 4 — Managing Input and Output
44
Intermec Fingerprint Developer’s Guide
There are various ways to produce double-byte characters from the keyboard of the
computer. By selecting the proper character set using a NASCD statement, the
typed-in ASCII values are translated to the corresponding Unicode values, so the
desired glyph will be printed.
Double-byte fonts and character set tables are available from Intermec. For
information, contact your Intermec sales representative.
In this example, the text field in line 50 contains both single- and double-byte fonts.
The double-byte font and its character set are stored in a Font Install Card. The
program yields a printed text line that starts with the Latin character A (ASCII 65
dec.) followed by the Chinese font that corresponds to the address 161+162 dec. in
the character set “BIG5.NCD.”
10
NASC 46
20
FONT “Swiss 721 BT”, 24, 10
30
NASCD “/rom/BIG5.NCD”
40
FONTD “Chinese”
50
PRTXT CHR$(65);CHR$(161);CHR$(162)
60 PRINTFEED
RUN
Converting Input Data
These Fingerprint commands are used to convert data in numeric or string
expressions:
ABS returns the absolute value of a numeric expression.
ASC returns the ASCII value of the first character in a string expression.
CHR$ returns the readable character of a specified ASCII value. This is useful
when a printer keyboard cannot produce a particular character.
FLOATCALC$ calculates float numbers using arithmetic operators.
FORMAT$ formats a number represented by a string and is typically used with
FLOATCALC$.
INSTR searches a string for a specific character or string of characters and
returns its position if found.
LEFT$ returns a specified number of characters from the beginning (left end) of
a string.
LEN returns the total number of characters and spaces in a string expression.
MID$ returns a portion of a string expression. You can specify the start position
and the number of characters to return.
RIGHT$ returns a specified number of characters from the end (right side) of a
string.
SGN returns the sign of a numeric expression.
SPACE$ returns a specified number of space characters. This command is useful
for creating tables with monospace characters.
STR$ returns the string representation of a numeric expression.