Determining the Number of Arguments
If you use the TEXT operand of the SCAN macro to specify the input data, you will know how many arguments it includes. If you get the data from somewhere else, you need to count the number of arguments. (An alternative is to provide storage for the maximum number of arguments you might receive).