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

About Constants, Variables, and Expressions, Variable Name Examples

Page 20 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. Numbers and other characters are considered part of the sequence and are not processed. String constants must always be enclosed by double quotation marks (ASCII 34 decimal); for example, "TEST.PRG". If the string constant is the last part of a line, the closing quotation mark is optional. • Numeric constants are fixed values. Only decimal integers are allowed (1, 2, 3, and so on). Values are positive unless preceded by a minus sign (-). Optionally, you can indicate a positive value using a leading plus sign (+). Variables also hold data, but their contents can change. You can specify the contents of a variable or use it as a container for data from Fingerprint operations. There are two types of variables: • String variables store sequences of text. The maximum size of a string is 64 Kb (65,535 characters). String variables are indicated by a trailing $ sign, as in these examples: A$="INTERMEC" B$ = TIME$ LET C$ = DATE$ • Numeric variables store only numbers. The maximum value of a numeric variable 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 can include 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 causes an error. LOC is not followed by other characters. This causes an error. LOC is preceded by C and followed by K. This variable name is valid. Note: Intermec suggests that all variables and line labels start with a q. For a list of reserved keywords, see "Reserved Keywords and Symbols" on page 137. 8 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
8
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. Numbers and other characters are
considered part of the sequence and are not processed.
String constants must always be enclosed by double quotation marks (ASCII 34
decimal); for example, “TEST.PRG”. If the string constant is the last part of a
line, the closing quotation mark is optional.
Numeric constants are fixed values. Only decimal integers are allowed (1, 2, 3,
and so on). Values are positive unless preceded by a minus sign (-). Optionally,
you can indicate a positive value using a leading plus sign (+).
Variables also hold data, but their contents can change. You can specify the contents
of a variable or use it as a container for data from Fingerprint operations. There are
two types of variables:
String variables store sequences of text. The maximum size of a string is 64 Kb
(65,535 characters). String variables are indicated by a trailing $ sign, as in these
examples:
A$=“INTERMEC”
B$ = TIME$
LET C$ = DATE$
Numeric variables store only numbers. The maximum value of a numeric
variable 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 can include 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 137
.
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 causes an error.
CLOC$
LOC is not followed by other characters. This causes an error.
CLOCK$
LOC is preceded by C and followed by K. This variable name is valid.
Note:
Intermec suggests that all variables and line labels start with a q.