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

About Constants, Variables, and Expressions, Variable Name Examples

Page 24 highlights

Chapter 2 - Understanding Fingerprint Syntax About Constants, Variables, and Expressions Constants are fixed text or values. There are two kinds of constants: • String constants are sequences of text characters. Digits or operators are considered part of the sequence of characters and are not processed. String constants must always be enclosed by quotation marks (ASCII 34 decimal), for example "TEST.PRG". If the string constant comes last on a line, the appending quotation mark can be excluded. • Numeric constants are fixed numeric values. Only decimal integers are allowed (1, 2, 3, and so on). Values are positive unless preceded by a minus sign (-). Optionally, positive values may be indicated by a leading plus sign (+). A leading minus sign is required for negative values. Variables are value holders. There are two main types: • String variables are used to store strings entered as string constants or produced by Fingerprint operations. Maximum size is 64 kbytes (65,535 characters). String variables are indicated by a trailing $ sign, as in these examples: A$="INTERMEC" B$ = TIME$ LET C$ = DATE$ • Numeric variables are used to store numbers entered as numeric constants or produced by Fingerprint operations. Maximum value is 2,147,483,647. Numeric variables are indicated by a trailing % sign, as in these examples: A% = 150 B% = DATEDIFF("031201","031230") LET C% = 2^2 A variable name may consist of letters, numbers, and decimal points. The first character must always be a letter, and the complete name must not be identical to any keywords or keyword abbreviations. If part of the variable name is identical to a keyword or keyword abbreviation, other characters must precede and follow that part of the variable name or errors will result. The next table lists some examples. Variable Name Examples Variable Name LOC$ LOCK$ CLOC$ CLOCK$ Description LOC is a keyword. This will cause an error. LOC is not preceded by other characters. This will cause an error. LOC is not followed by other characters. This will cause an error. LOC is preceded by C and followed by K. This variable name will not cause errors. For a list of reserved keywords, see "Reserved Keywords and Symbols" on page 157. An expression can be either a constant or a variable. There are two types of expressions: 8 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 2 — Understanding Fingerprint Syntax
8
Intermec Fingerprint Developer’s Guide
About Constants, Variables, and Expressions
Constants are fixed text or values. There are two kinds of constants:
String constants are sequences of text characters. Digits or operators are
considered part of the sequence of characters and are not processed.
String constants must always be enclosed by quotation marks (ASCII 34
decimal), for example “TEST.PRG”. If the string constant comes last on a line,
the appending quotation mark can be excluded.
Numeric constants are fixed numeric values. Only decimal integers are allowed
(1, 2, 3, and so on). Values are positive unless preceded by a minus sign (-).
Optionally, positive values may be indicated by a leading plus sign (+). A leading
minus sign is required for negative values.
Variables are value holders. There are two main types:
String variables are used to store strings entered as string constants or produced
by Fingerprint operations. Maximum size is 64 kbytes (65,535 characters). String
variables are indicated by a trailing $ sign, as in these examples:
A$=“INTERMEC”
B$ = TIME$
LET C$ = DATE$
Numeric variables are used to store numbers entered as numeric constants or
produced by Fingerprint operations. Maximum value is 2,147,483,647. Numeric
variables are indicated by a trailing % sign, as in these examples:
A% = 150
B% = DATEDIFF(“031201”,“031230”)
LET C% = 2^2
A variable name may consist of letters, numbers, and decimal points. The first
character must always be a letter, and the complete name must not be identical to
any keywords or keyword abbreviations. If part of the variable name is identical to a
keyword or keyword abbreviation, other characters must precede and follow that
part of the variable name or errors will result. The next table lists some examples.
For a list of reserved keywords, see
“Reserved Keywords and Symbols” on
page 157.
An expression can be either a constant or a variable. There are two types of
expressions:
Variable Name Examples
Variable Name
Description
LOC$
LOC is a keyword. This will cause an error.
LOCK$
LOC is not preceded by other characters. This will cause an error.
CLOC$
LOC is not followed by other characters. This will cause an error.
CLOCK$
LOC is preceded by C and followed by K. This variable name will not
cause errors.