pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
The number of actual parameters can be less than the number of formal parameters. If actual
parameters are missing, the corresponding formal parameters expand to empty text. For each
missing actual parameter, you can use a placeholder comma, as in Example 27 (page 101).
Example 27 Fewer Actual Parameters Than Formal Parameters
INT PROC d (a, b, c) EXTENSIBLE; EXTERNAL;
DEFINE something (a, b, c) = d (a, b, c) #;
nothing := something ( , , c); ! Placeholder commas
If a DEFINE has formal parameters and you pass no actual parameters to the DEFINE, you must
specify an empty actual parameter list. You can include commas between the list delimiters, but
need not, as in Example 28 (page 101).
Example 28 No Actual Parameters
DEFINE something (a, b, c) = anything and everything #;
nothing := something ( ); ! Empty parameter list
If the number of actual parameters exceeds the number of formal parameters, as in Example 29
(page 101), the compiler issues an error.
Example 29 More Actual Parameters Than Formal Parameters
DEFINE something (a, b, c) = anything and everything #;
nothing := something (a, b, c, d); ! Too many parameters
If an actual parameter in a DEFINE invocation requires commas, enclose each comma in apostrophes
('). An example is an actual parameter that is a parameter list, as in Example 30 (page 101).
Example 30 Commas in an Actual Parameter
DEFINE varproc (proc1, param) = CALL proc1 (param) #;
varproc (myproc, i ',' j ',' k); ! Expands to:
An actual parameter in a DEFINE invocation can include parentheses, as in Example 31 (page 101).
Example 31 Parentheses in an Actual Parameter
DEFINE varproc (proc1, param) = CALL proc1 (param) #;
varproc (myproc, (i + j) * k); ! Expands to:
! CALL myproc ((i+j)*k);
Example 32 (page 102) shows a DEFINE declaration that has one formal parameter and an
assignment statement that uses the DEFINE identifier, passing a parameter of 3.
Passing Actual Parameters to DEFINEs 101