<?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 &amp;quot;;&amp;quot; is not needed after do in the code? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-quot-quot-is-not-needed-after-do-in-the-code/m-p/109145#M22689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you PG for your explanation! I was so scared when I found out the missing ";".&amp;nbsp; - Linlin &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 May 2012 15:09:43 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2012-05-09T15:09:43Z</dc:date>
    <item>
      <title>Why ";" is not needed after do in the code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-quot-quot-is-not-needed-after-do-in-the-code/m-p/109143#M22687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am curious to know why &lt;SPAN style="color: #ff0000;"&gt;missing ";" after do&lt;/SPAN&gt; did&amp;nbsp; not cause problem in the code below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;id=1;&lt;/P&gt;&lt;P&gt;input letter $8.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;b&lt;/P&gt;&lt;P&gt;bu&lt;/P&gt;&lt;P&gt;but&lt;/P&gt;&lt;P&gt;bur&lt;/P&gt;&lt;P&gt;butter&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;proc transpose data=have out=temp;&lt;/P&gt;&lt;P&gt;by id;&lt;/P&gt;&lt;P&gt;var letter;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array _s(*) col:;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do _n_=1 to dim(_s) ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lengthn(_s(_n_))=1 and _s(_n_)="b" then &lt;SPAN style="color: #ff0000;"&gt;do score1=1; score+1;end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else if lengthn(_s(_n_))=2 and _s(_n_)="bu" then &lt;SPAN style="color: #ff0000;"&gt;do score2=1; score+1;end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if lengthn(_s(_n_))=6 and _s(_n_)="butter" then &lt;SPAN style="color: #ff0000;"&gt;do score6=1; score+1;end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks - Linlin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 14:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-quot-quot-is-not-needed-after-do-in-the-code/m-p/109143#M22687</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-05-09T14:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why ";" is not needed after do in the code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-quot-quot-is-not-needed-after-do-in-the-code/m-p/109144#M22688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have inadvertantly defined iterative do loops, as in :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i = 1, 10, 100;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; score + i;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;except that the list of values for the control variable contains a single value. It thus executes only once, which is also what the do block would have done. So in the end, with or without the ";", the result is the same. Interesting. Thanks for brinning it up Linlin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 14:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-quot-quot-is-not-needed-after-do-in-the-code/m-p/109144#M22688</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-05-09T14:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why ";" is not needed after do in the code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-quot-quot-is-not-needed-after-do-in-the-code/m-p/109145#M22689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you PG for your explanation! I was so scared when I found out the missing ";".&amp;nbsp; - Linlin &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 15:09:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-quot-quot-is-not-needed-after-do-in-the-code/m-p/109145#M22689</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-05-09T15:09:43Z</dc:date>
    </item>
  </channel>
</rss>

