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 (February 1996, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 29 Feb 1996 10:36:52 -0500
Reply-To:     Phil Gallagher <pgallagh@MAIL.CATO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Phil Gallagher <pgallagh@MAIL.CATO.COM>
Organization: Cato Research Ltd.
Subject:      Thanks, re:  macro parameter lists
In-Reply-To:  <E16C4D5001D2B4D1>

Many thanks to everyone who wrote with respect to my query about style aspects of writing macros with and without parameter lists. For some time now I have been slavishly following the well known examples in Michael Friendly's code and Ian Whitlock's code and (well-known, at least to me) Karsten Self's code, using keyword parameter lists for macros. And I had not really thought about why it was or was not a good idea - if Michael and Ian and Karsten do it conscientiously, who am I to just go off and do it some other way for no reason at all? Now I sit back and can see what a mess one can get into with global macrovars created via %LET stmnts, when all that is needed are local macrovars, and I'm very glad that I've been taught how to do it correctly via the Masters' examples. Admittedly, my macros have been simpler than theirs, and I ought not to have gotten into serious trouble anyway, but I urge all beginners to look at Michael Friendly's statistical graphics macros (either buy his book or find his examples in the archives) for good examples of keyword parameter list style to emulate. It's easy for a beginner to just follow the introductory examples in the SAS Guide to Macro Processing, where they do use %LET to change values in a macro, but that's because they are trying to keep the complexity of the introductory pages to a minimum; a much better idea is to continue reading and master the (slightly) more complex material which follows. If one wants, one can even try to master the appreciably more complex matters that follow that, and get into the discussions with Paul and Ian and John and Karsten of when things are resolved! ;-) Shame on me!


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