On Mon, 16 Jul 2007 11:42:09 -0400, Cary MILLER <CMILLER1@COQIO.SDPS.ORG>
> But I want to experiment with recursion. Andre has correctly identified
the problem as being
>the ; that shows up in the %eval call. So now I am mystified as to how
that ; got there. The
>macro variable &next has the ; appended... but why???
If you mean that the program is as you typed it (i.e. you're not suggesting
that someone else changed it) but you don't know why the semicolon ended up
in the macro expansion, that extra semicolon that was mentioned in another
message was just that - extra. Unnecessary semicolons in a macro (as well
as unnecessary anything else as long as it doesn't result in invalid macro
syntax) become part of the text expansion of the macro. It often doesn't
matter, but sometimes it does (e.g. when you're trying to make a macro that
you can use similarly to a function within a SAS statement).
And, I agree, if you want to teach yourself recursion there's nothing wrong
with picking SAS Macros as a base for playing with recursion (although I
think almost any other language that permits recursion would be easier).