When you specify more values than the number of variables following
PULL or ARG, the last variable gets the remaining values. For example,
you pass three numbers to the program ADD:
REXX add 42 21 10
The language processor assigns the value 42 to number1, the first variable following ARG. It assigns the value 21 10 to number2, the second variable. In this situation,
the program ends with an error when it tries to add the two variables.
In other situations, the program might not end in error.
To prevent the last variable from getting the remaining values,
use a period (.) at the end of the PULL or ARG instruction.
ARG number1 number2 .
The period acts as a
dummy variable to
collect unwanted extra information. (In this case,
number1 receives
42,
number2 receives
21, and the period
ensures the
10 is discarded. If there is no extra information,
the period is ignored. You can also use a period as a placeholder
within the PULL or ARG instruction as follows:
ARG . number1 number2
In this case, the first value, 42, is discarded and number1 and number2 get the next two values, 21 and 10.