I think the problem with VARARGS is that it requires an explicity defined temporary array containing the variable arguments. Not terribly useful... I think if it were me I'd make it a macro function that called two different functions based on the number of arguments passed to the macro, ie something like %macro scanplus(string=,wordpos=,wordcount=,delimeter=NA,modifiers=NA); %if &delimeter=NA %then %do; function1(&string,&wordpos,&wordcount); %end; %else do; function2(&string,&wordpos,&wordcount,&delimeter,&modifiers); %end; %mend scanplus; Suboptimal but not horrendous.
... View more