Hi!
Having a "C" background, I want to implement a procedure which I can call with a variable
number of parameters. In "C" you have a varargs.h
If my intention is unclear, maybe
helps understand my question.
My compilation unit is a "package", and the procedure is using locally inside the package.
To give an example:
CALL INIT_SET_OF_VALUES(VALUE1);
or
CALL INIT_SET_OF_VALUES(VALUE1, VALUE2, VALUE3);
I want to avoid a calls/definitions like
/* provide the number of actual provided parameters */
CALL INIT_SET_OF_VALUES(n, VALUE1, ... , VALUEn);
or
/* define the procedure for a maximum number of params and provide always
as many parameters as defined. If less parameters are available a specific
"nullValue" is used to fillup the param list and
signal: this formal parameter has no actual value */
CALL INIT_SET_OF_VALUES(VALUE1, nullValue, nullValue);
Questions:
Q-1: Is there a way to do it (without using an assembler part to determine the # of params)
Q-2: How to declare such a procedure?
Q-3: How to pick the number of parameters provided
I was not able to find a hint in the PL/1 manuals.
Regards, JustAFreeName
JustAFreeName