pTAL Reference Manual (H06.03+)
LITERALs and DEFINEs
HP pTAL Reference Manual—523746-005
6-4
Declaring DEFINEs
param-list
param-name
is the identifier of a formal parameter. You can specify up to 31 formal
parameters. An actual parameter can be up to 500 bytes. A formal
parameter cannot be a pTAL reserved word.
define-body
specifies all characters between the = and # delimiters. define-body can
span multiple source lines. Enclose character strings in quotation marks ("). To
use # as part of the define-body rather than as a delimiter, enclose the # in
quotation marks or embed the # in a character string.
DEFINE declaration requirements:
•
If a DEFINE and a formal parameter have the same identifier, the formal parameter
has priority during expansion.
•
A DEFINE must not reference itself.
•
A DEFINE declaration must not appear within a DEFINE body; that is, do not nest
a DEFINE within a DEFINE.
•
To ensure proper grouping and order of evaluation of expressions in the DEFINE
body, use parentheses around each DEFINE parameter used in an expression.
•
Within the DEFINE body, place any compound statements within a BEGIN-END
block.
•
Directives appearing within a DEFINE body are evaluated immediately; they are
not part of the DEFINE itself.
•
Expanded DEFINEs must produce correct pTAL constructs. To list the expanded
DEFINEs in the compiler listing, specify the DEFEXPAND directive before the
DEFINE declarations.
( param-name
,
)
VST994.vsd










