TAL Reference Manual

LITERALs and DEFINEs
TAL Reference Manual526371-001
5-4
Usage Considerations
identifier
is the identifier of the DEFINE.
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 long.
define-body
is all characters between the = and # delimiters. define-body can span multiple
source lines. Enclose character strings in quotation marks ("). To use # in as part of
the
define-body rather than as a delimiter, enclose the # in quotation marks or
embed the # in a character string.
Usage Considerations
DEFINE declarations have the following characteristics:
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.
A DEFINE cannot replace a keyword with another term; for example, a DEFINE
cannot replace BEGIN with START.
To ensure proper grouping and 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
construct.
Directives appearing within a DEFINE body are evaluated immediately; they are
not part of the DEFINE itself.
If the CODE (DECS) and CODE (RP) statements are equivalent to the DECS and
RP directives but do not execute until a reference to the DEFINE identifier occurs.
Statements are part of the DEFINE itself.