pTAL Reference Manual (H06.08+)
Language Elements
HP pTAL Reference Manual—523746-006
2-8
Declarations
Declarations
Declarations allocate storage and associate identifiers with declarable objects in a
program; that is:
•
Variables
•
LITERALs and DEFINEs (see Section 6, LITERALs and DEFINEs)
•
Procedures (see Section 14, Procedures, Subprocedures, and Procedure Pointers)
•
Labels (see Labels in Procedures on page 14-37)
•
Entry points (see Entry-Point Declarations on page 14-22)
Topics:
•
Identifiers on page 2-8
•
Variables on page 2-10
•
Scope on page 2-10
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 on page 17-28.
•
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 2-2 on page 2-3).
•
Identifiers can be nonreserved keywords, except as noted in Table 2-3 on
page 2-3.
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_).










