LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 17 Jul 2007 14:51:27 -0400
Reply-To:     Douglas Martin <douglas.martin@CIRG.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Douglas Martin <douglas.martin@CIRG.ORG>
Subject:      Re: %eval in recursive macro

On Mon, 16 Jul 2007 11:42:09 -0400, Cary MILLER <CMILLER1@COQIO.SDPS.ORG> wrote:

>Thanks toby, > 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??? >CAM >

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).


Back to: Top of message | Previous page | Main SAS-L page