pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Identifiers
Identifiers must conform to these rules:
Identifiers can have up to 132 characters. You can limit the identifier to 31 characters by
setting the DO_TNS_SYNTAX (page 389).
Identifiers begin with an alphabetic character, an underscore (_), or a circumflex (^).
Identifiers contain alphabetic characters, numeric characters, underscores, or circumflexes.
Identifiers contain lowercase and uppercase alphabetic characters. The compiler treats all
characters as uppercase.
Identifiers cannot be reserved keywords (see Table 9 (page 37)).
Identifiers can be nonreserved keywords, except as noted in Table 10 (page 37).
In addition to the preceding rules, HP recommends that you:
Use underscores rather than circumflexes to separate words in identifiers (for example, use
Name_Using_Circumflexes rather than Name^Using^Circumflexes). This guideline
reflects international character-set standards, which allow the character printed for the circumflex
to vary by country.
Do not end identifiers with an underscore. The trailing underscore is reserved for identifiers
supplied by the operating system (such as Name_Using_Trailing_Underscore_).
Example 1 Correct Identifiers
a2
HP
_2345678012_31_characters
name_with_exactly_31_characters
Example 2 Incorrect Identifiers
ProblemIdentifier
Begins with a number2abc
Contains % symbolab%99
Reserved wordVARIABLE
Each identifier belongs to an identifier class. The compiler determines the identifier class based
on how you declare the identifier.
Table 15 Identifier Classes
DescriptionClass
Global data blockBlock
Read only (P-relative) arrayCode
Simple variable, array, nonstructure pointer, structure pointer, structure, or structure
data item
Variable
Named textDEFINE*
Procedure or subprocedure that returns a valueFunction
Statement labelLabel
Named constantLITERAL
Procedure or subprocedure that does not return a valuePROC
42 Language Elements