tag:blogger.com,1999:blog-2315822260943695633.post1912210307979607410..comments2024-03-09T03:56:41.825-05:00Comments on StudySAS Blog: Resolving and Using &&var&i Macro VariablesUnknownnoreply@blogger.comBlogger4125tag:blogger.com,1999:blog-2315822260943695633.post-18262500526734690402014-01-16T06:07:51.876-05:002014-01-16T06:07:51.876-05:00&&&dsn&n is broken like this [or a...&&&dsn&n is broken like this [or any thing multiple ampersands] : starting from left, taking ampersands in pairs. also breaking at where another variable is encountered. Applying the same again and again.<br />|&&||&dsn||&n|<br /><br />now each pure pair of ampersands resolves to a single ampersand. a single variable is kept as it is, &var resolves to assigned value or throws up an error.<br /><br />so. &&&dsn&n = |&&||&dsn||&n| = |&| |study| |05| =&study05= error, because there is no study05 macro var. It does not resolve to &client05 as you claim in your example.<br /><br />Lord Zuluhttps://www.blogger.com/profile/08924141429346437599noreply@blogger.comtag:blogger.com,1999:blog-2315822260943695633.post-49007108084634919602013-05-29T02:48:09.372-04:002013-05-29T02:48:09.372-04:00Hello sarath,
After reading your post for SAS Macr...Hello sarath,<br />After reading your post for <a href="&%20vs%20&&%20vs%20&&&%20and%20single%20dot%20and%20double%20dots" rel="nofollow">SAS Macro</a> variables,I have got cleared better relate to & vs && vs &&& and single dot and double dots and difference between them,Thanks for posting such informative postSAS Training Indiahttps://www.blogger.com/profile/11395917736790675165noreply@blogger.comtag:blogger.com,1999:blog-2315822260943695633.post-41511646516926213372013-04-13T16:26:21.747-04:002013-04-13T16:26:21.747-04:00Sometimes SAS is just crazy, at least it's nev...Sometimes SAS is just crazy, at least it's never boring though...<br /><br />%let six = seven;<br />%let five = six;<br />%let four = five;<br />%let three = four;<br />%let two = three;<br />%let one = two;<br /><br />%macro test;<br />%put &one; /* 1 '&': -> two */<br />%put &&&one; /* 3 '&'s: -> &two -> three */<br />%put &&&&&&&one; /* 7 '&'s: -> &&&two -> &three -> four */<br />%put &&&&&&&&&&&&&&&one; /* 15 '&'s: &&&&&&&two -> &&&three -> &four -> five */<br />%put &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&one; /* 31 '&'s: -> six */<br />%put &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&one; /* 63 '&'s: -> seven */<br />%mend;<br /><br />%test;Alan Daviesnoreply@blogger.comtag:blogger.com,1999:blog-2315822260943695633.post-69356914479752880102009-09-30T20:19:37.695-04:002009-09-30T20:19:37.695-04:00thank u so much sarath, now i got clear of the mul...thank u so much sarath, now i got clear of the multiple &..... Thank U so muchAnonymousnoreply@blogger.com