Date: Tue, 29 Jul 2008 09:05:04 -0500
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: tip: Macro Design Checklist
In-Reply-To: <98634D42B37B2E4E96CF3A3BD3CD9AE60216269A@EX1VS2.nyced.org>
Content-Type: text/plain; charset=ISO-8859-1
Why would you need a macro to count words?
On 7/29/08, Bucher Scott <SBucher@schools.nyc.gov> wrote:
> I use positional parameters with macro functions that I use frequently
> and that have arguments that are few and relatively intutitive, e.g.
> %wordcount(). If the macro functions has more than 3 arguments, I use a
> combination of positional parameters and keyword parameters with default
> values. I think the examples cited within the sasautos library were also
> macro functions.
>
> Regards,
> Scott Bucher
>
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> Fehd, Ronald J. (CDC/CCHIS/NCPHI)
> Sent: Tuesday, July 29, 2008 9:05 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: tip: Macro Design Checklist
>
> > From: RolandRB
> >
> > On Jul 28, 10:06 pm, r...@CDC.GOV ("Fehd, Ronald J. (CDC/CCHIS/
> > NCPHI)") wrote:
> > > I have updated my Macro Design Checklist page
> > >
> > > http://www.sascommunity.org/wiki/Macro_Design_Issues_Checklist
> >
> > Your first tip is "always use named parameters".
>
> > This is a bad general tip to give
>
> My 20 years experience says otherwise.
>
> > as it depends on the circumstances.
>
> imnsho, those circumstances are usually that the macro is in a program.
>
> \begin{quote}
> Note: These recommendations are for project and site macros, i.e. macros
> not in a program, but in separate files.
> \end{quote}
>
> > The SAS Institute
> > itself does not follow this recommendation.
>
> <sigh> yes, I know.
> From my perspective on the HelpDesk
> SAS Institute creates more problems for itself and its customers by
> publishing Reeeeally! Bad Examples both in OnLine Doc, paper manuals,
> and training courses.
>
> > Check out the %trim and
> > %left macros that they distribute with their sasautos library.
>
> There are 500 macros provided in 300 files in 13 folders in the sasautos
> library.
> The only thing that I would recommend about them is that they have a
> fairly consistent header for their documentation.
>
> Ron Fehd the documentation maven
> and the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov
>
|