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 (November 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 2 Nov 2007 15:14:29 -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: Quiz: Double/Single Quotes and Macro Var Resolution
Comments: To: toby dunn <tobydunn@hotmail.com>
In-Reply-To:  <BAY123-W13D91E4D36D30301557D61DE8D0@phx.gbl>
Content-Type: text/plain; charset=ISO-8859-1

From the DOCs

Comparisons

%BQUOTE and %NRBQUOTE do not require that you mark quotation marks but matching parentheses are required.

%NRBQUOTE and the %SUPERQ function mask the same items. However, %SUPERQ does not attempt to resolve a macro variable reference or a macro invocation that occurs in the value of the specified macro variable. %NRBQUOTE does attempt to resolve such references

On 11/2/07, toby dunn <tobydunn@hotmail.com> wrote: > Cute Chang very cute.... > > > Now why did he use NrBquote Rather than %BQuote and why doesnt %SuperQ inplace of %NRBQuote come up with the same message tp the log.... > > Toby Dunn > > Compromise is like telling a lie, it gets easier and easier. Each compromise you make, that becomes your standard. > > Perfection doesnt exist, once you reach it, its not perfect anymore. It means something else. > > > Date: Fri, 2 Nov 2007 15:45:52 -0400 > > From: chang_y_chung@HOTMAIL.COM > > Subject: Quiz: Double/Single Quotes and Macro Var Resolution > > To: SAS-L@LISTSERV.UGA.EDU > > > > OK, just because it is Friday, here is a fun quiz. Everybody knows that a > > macro var references are not resolved within a single-quoted string. > > > > %let name=chang; > > %put 'Hello, &name!'; > > /* on log > > 'Hello, &name!' > > */ > > > > But there seems to be an exception! Certain SAS-L HOF is so famous -- so > > much so that even sas seems to know his name -- his name shines through > > even in a single-quoted string! > > > > %macro hello(msg=); > > %let msg = %nrbquote(&msg.); > > %put &msg.; > > %mend hello; > > > > %let name=toby; > > %hello(msg=%nrstr('Hello, &name!')) > > /* on log > > 'Hello, toby!' > > */ > > > > > > > > > > > > > > > > > > > > ... > > Answer is found in Lee's paper TU04 in the PhUSE 2007 conference > > proceeding! > > _________________________________________________________________ > Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! > http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews >


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