<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: why multiple ampersand resolve to this? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59406#M12871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;. will tell sas that the macro resolution shoudl end at dot and after that any resolution would be different from the current.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Apr 2012 04:10:25 GMT</pubDate>
    <dc:creator>manojinpec</dc:creator>
    <dc:date>2012-04-11T04:10:25Z</dc:date>
    <item>
      <title>why multiple ampersand resolve to this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59401#M12866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%let var=city;&lt;/P&gt;&lt;P&gt;%let n=6;&lt;/P&gt;&lt;P&gt;%put &amp;amp;&amp;amp;&amp;amp;&amp;amp;var&amp;amp;n;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after 4 ampersand, and resolve to &amp;amp;var6, why &amp;amp;var?&lt;/P&gt;&lt;P&gt;I mean it should be &amp;amp;city6.right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 06:07:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59401#M12866</guid>
      <dc:creator>ZRick</dc:creator>
      <dc:date>2012-04-10T06:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: why multiple ampersand resolve to this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59402#M12867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two &amp;amp;s (&amp;amp;&amp;amp;) resolve to one &amp;amp; &lt;/P&gt;&lt;P&gt;Four or more &amp;amp;s are resolved from left to right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you want &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;amp;city6&lt;/SPAN&gt; then you need to use &amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;var&amp;amp;n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 06:43:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59402#M12867</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-04-10T06:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: why multiple ampersand resolve to this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59403#M12868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is process:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;var&lt;SPAN style="text-decoration: underline;"&gt;&amp;amp;n&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;var6&lt;/P&gt;&lt;P&gt;-&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;var6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 07:13:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59403#M12868</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-10T07:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: why multiple ampersand resolve to this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59404#M12869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ZRick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are looking to get &amp;amp;city6, while 4 ampersands work, 3 would have been enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In &amp;amp;&amp;amp;&amp;amp;var&amp;amp;n:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp; becomes &amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;var becomes city&lt;/P&gt;&lt;P&gt;&amp;amp;n becomes 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the whole thing becomes &amp;amp;city6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many times, extra ampersands don't hurt but they merely require additional resolution.&amp;nbsp; For example, 6 ampersands would also have worked if you add a delimiter (see below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In &amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;&amp;amp;var.&amp;amp;n&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp; becomes &amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp; becomes &amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp; becomes &amp;amp;&lt;/P&gt;&lt;P&gt;var. remains var.&lt;/P&gt;&lt;P&gt;&amp;amp;n becomes 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So after one set of resolutions, this becomes &amp;amp;&amp;amp;&amp;amp;var.6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the next set of resolutions,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp; becomes &amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;var. becomes city&lt;/P&gt;&lt;P&gt;6 remains 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So after the second set of resolutions, this becomes &amp;amp;city6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As other posters mentioned, move from left to right, and resolve each text string.&amp;nbsp; Then re-resolve if necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 13:02:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59404#M12869</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-04-10T13:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: why multiple ampersand resolve to this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59405#M12870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Astounding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain why adding period then whole result changed? if I put %put &amp;amp;&amp;amp;&amp;amp;&amp;amp;var.&amp;amp;n; now it turns to city6, why is that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 03:42:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59405#M12870</guid>
      <dc:creator>ZRick</dc:creator>
      <dc:date>2012-04-11T03:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: why multiple ampersand resolve to this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59406#M12871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;. will tell sas that the macro resolution shoudl end at dot and after that any resolution would be different from the current.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 04:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59406#M12871</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-04-11T04:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: why multiple ampersand resolve to this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59407#M12872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is process:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;var.&lt;SPAN style="text-decoration: underline;"&gt;&amp;amp;n&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;var.6&lt;/P&gt;&lt;P&gt;-&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;var.6&lt;/P&gt;&lt;P&gt;-&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; city6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 05:52:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59407#M12872</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-11T05:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: why multiple ampersand resolve to this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59408#M12873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's absolutely correct.&amp;nbsp; To put it in words ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a dot, the expression resolves as Ksharp indicated.&amp;nbsp; Within &amp;amp;var.6, the dot delimits the name of the macro variable.&amp;nbsp; It tells macro language that VAR is the name of the macro variable, and 6 is just text to be appended to &amp;amp;VAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without a dot, the expression would resolve to &amp;amp;var6.&amp;nbsp; How would macro language know to look for &amp;amp;VAR, rather than &amp;amp;VAR6?&amp;nbsp; It doesn't.&amp;nbsp; This would trigger a search for &amp;amp;VAR6.&amp;nbsp; Since there is no such macro variable, it would generate an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, keep asking!&amp;nbsp; Speaking for myself only, I'm more than willing to help when I see that you are putting in the work and trying hard to learn.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 13:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-multiple-ampersand-resolve-to-this/m-p/59408#M12873</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-04-11T13:29:21Z</dc:date>
    </item>
  </channel>
</rss>

