Hi Yes, I saw later that the example is actually working inside proc fcmp. I assumed that I could actually define a user function similar to cat(), where number of arguments is not defined. The problem is already solved with macro. I'll share a problem, so maybe someone can share their neat solution to it. Problem: For the undefined number of words, check if any of the words are actually in the string. I.e. to simulate such statement: indexw(source, 'string1') or indexw(source, 'string2') or .. or indexw(source, 'stringX') stringN can be any possible non-missing string, including single/multiple white space. The function I was attempting to write was just to make code look cleaner and easier to maintain when search strings are added or removed. Thanks for all the trouble. Just by writing this I had a thought that regular expressions could also solve this without a macro: prxmatch('/\b(string1|string2|...|stringX)\b/') (Please be aware, regexp not actually checked, just something from my head. Regexp tend to become write-only in long term and it's difficult to maintain) Thanks,
... View more