Hi Rajaram,
Proc fcmp supports the VARARGS argument. This indicates you have a variable list of arguments. The argument must be an array:
options cmplib=sasuser.funcs;
proc fcmp outlib=sasuser.funcs.temp;
function summation (b[*]) varargs;
total = 0;
do i = 1 to dim(b);
total = total + b[i];
end;
return(total);
endsub;
sum=summation(1,2,3,4,5);
put sum=;
run;
It may not be entirely what you were hoping for as this implies some limitations. But that's up to you.
See the doc for details.
Regards,
- Jan
... View more