| Date: | Tue, 29 Jul 2008 12:25:39 -0700 |
| Reply-To: | jfh@stanfordalumni.org |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Jack Hamilton <jfh@STANFORDALUMNI.ORG> |
| Subject: | Re: Always ending macro variables with a dot (was tip: Macro
Design Checklist) |
| In-Reply-To: | <001701c8f177$d646de30$0401a8c0@8300xpserver> |
| Content-Type: | text/plain; charset="ISO-8859-1" |
An interesting example, but I would draw the opposite conclusion: Use
the dot unless there's a reason not to.
In general, though, I think that most people who are using triple
ampersands have gotten in over their heads. In my experience, it's been
beginners rather than experts who have felt a need for multiply-resolved
macro variables.
I have probably seen questions about them on SAS-L more times than I
have had personal need for them. If it's confusing, I try to find way
not to do it, and usually there is such a way.
On Tue, 29 Jul 2008 08:37:17 -0400, "Don Henderson"
<donaldjhenderson@HOTMAIL.COM> said:
> Jack,
>
> Take a look at:
>
> http://listserv.uga.edu/cgi-bin/wa?A2=ind0804B&L=sas-l&P=R18071
>
> And thanks for asking this question, it reminded me that I did not create
> the article on www.sasCommunity.org on the rules for macro variable
> resolution. I will try to do that later today and then post the link so
> others can comment on it and improve it.
>
> Again, my primary opposition to this is that it introduces confusion into
> the understanding of how SAS parses complex macro variable references.
> For
> simple references, the dot adds very little. For complex references, it
> adds
> complexity and confusion.
>
> Regards,
> donh
>
> > -----Original Message-----
> > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On
> > Behalf Of Jack Clark
> > Sent: Tuesday, July 29, 2008 8:20 AM
> > To: SAS-L@LISTSERV.UGA.EDU
> > Subject: Always ending macro variables with a dot (was tip:
> > Macro Design Checklist)
> >
> > I am interested in hearing more user's views on whether it is
> > good practice to always end macro variables with a dot (.).
> > I attended Ron Fehd's presentation at NESUG 2007 and he
> > suggested always ending macro variables with a dot (.). Now
> > another expert on SAS-l (Don Henderson) has suggested the opposite.
> >
> >
> > Don - can you give some examples where an unnecessary dot at
> > the end of a macro variable could cause problems?
> >
> >
> > Thanks,
> >
> >
> > Jack Clark
> >
> >
> >
> >
> >
> > Jack Clark
> > Research Analyst
> > phone: 410-455-6256
> > fax: 410-455-6850
> > jclark@hilltop.umbc.edu
> >
> > University of Maryland, Baltimore County Sondheim Hall, 3rd
> > Floor 1000 Hilltop Circle Baltimore, MD 21250
> >
> >
> >
> >
> > Confidentiality Notice: This e-mail may contain information
> > that is legally privileged and that is intended only for the
> > use of the addressee(s) named above. If you are not the
> > intended recipient, you are hereby notified that any
> > disclosure, copying of this e-mail, distribution, or action
> > taken in reliance on the contents of this e-mail and/or
> > documents attributed to this e-mail is strictly prohibited.
> > If you have received this information in error, please notify
> > the sender immediately by phone and delete this entire
> > e-mail. Thank you.-----Original Message-----
> > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On
> > Behalf Of Don Henderson
> > Sent: Tuesday, July 29, 2008 7:21 AM
> > To: SAS-L@LISTSERV.UGA.EDU
> > Subject: Re: tip: Macro Design Checklist
> >
> > Roland,
> >
> > I have to (pretty emphatically) disagree with you on your
> > comment below.
> > My
> > rationale can be found at:
> >
> > http://www.sascommunity.org/wiki/Talk:Macro_Design_Issues_Checklist
> >
> > By discussing this on the Talk page, a concensus can be
> > reached and the main article can be updated as appropriate to
> > present a balanced view of the differing positions.
> >
> > I commented as well on the convention to always end a macro
> > variable reference with a dot (.) - a convention that I find
> > to not be a good idea in general.
> >
> > Regards,
> > -don h
> >
--
Jack Hamilton
Sacramento, California
jfh@alumni.stanford.org <== Use this, not jfh@stanfordalumni.org
|