<?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: Meaning of a= b*(c&amp;lt;=i&amp;lt;=d) +1 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563737#M158066</link>
    <description>&lt;P&gt;You don't need to build an algorithm for this, this formula can be used as is in SAS.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2019 15:42:42 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-06-05T15:42:42Z</dc:date>
    <item>
      <title>Meaning of a= b*(c&lt;=i&lt;=d) +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563729#M158063</link>
      <description>&lt;P&gt;I want to evaluate an expression in SAS . Can some one help me understand the meaning of this expression and write a short algo for this expression:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;a= b*(c&amp;lt;=i&amp;lt;=d) +1&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 15:23:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563729#M158063</guid>
      <dc:creator>SanjuKumari</dc:creator>
      <dc:date>2019-06-05T15:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Meaning of a= b*(c&lt;=i&lt;=d) +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563733#M158064</link>
      <description>&lt;P&gt;Use the Order of Operations rule of basic mathematics and break it apart.&lt;/P&gt;
&lt;P&gt;BEDMAS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;*B = Brackets;&lt;/STRONG&gt;&lt;/FONT&gt;
p1 = c&amp;lt;=i&amp;lt;=d;
&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;*Exponents -none;
*Division and multiplication in the order they appear;&lt;/FONT&gt;&lt;/STRONG&gt;
p2 = b*p1;
&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;*Addition and subtraction in the order they appear;&lt;/STRONG&gt;&lt;/FONT&gt;
p3 = p2 + 1;
&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;*original formula;&lt;/STRONG&gt;&lt;/FONT&gt;
A = b*(c&amp;lt;=i&amp;lt;=d) + 1;&lt;BR /&gt;
&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;*check the difference;&lt;/FONT&gt;&lt;/STRONG&gt;
diff = p3 - A;&lt;/PRE&gt;
&lt;P&gt;What do you mean by &lt;STRONG&gt;"write a short algo for this expression"?&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/276810"&gt;@SanjuKumari&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to evaluate an expression in SAS . Can some one help me understand the meaning of this expression and write a short algo for this expression:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;a= b*(c&amp;lt;=i&amp;lt;=d) +1&lt;/STRONG&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 15:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563733#M158064</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-05T15:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Meaning of a= b*(c&lt;=i&lt;=d) +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563737#M158066</link>
      <description>&lt;P&gt;You don't need to build an algorithm for this, this formula can be used as is in SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 15:42:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563737#M158066</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-06-05T15:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Meaning of a= b*(c&lt;=i&lt;=d) +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563750#M158072</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/276810"&gt;@SanjuKumari&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It means that the value of variable b is multiplied with the value of the logical expression in the parentheses, and then 1 is added to the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The logical expression&amp;nbsp;c&amp;lt;=i&amp;lt;=d returns 1, if the value of variable i is within the interval c-d, or otherwise 0. So when variable b is multiplied with the the logical expression, the result is either b or 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you add 1 to the result, which means that variable a is assigned the value b+1 or 1 depending on whether&amp;nbsp;variable i is within the interval c-d or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 16:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563750#M158072</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2019-06-05T16:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Meaning of a= b*(c&lt;=i&lt;=d) +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563751#M158073</link>
      <description>&lt;P&gt;i want to know what b will get multiplied with ?&lt;BR /&gt;the value of P1 as per u .&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 16:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563751#M158073</guid>
      <dc:creator>SanjuKumari</dc:creator>
      <dc:date>2019-06-05T16:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Meaning of a= b*(c&lt;=i&lt;=d) +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563752#M158074</link>
      <description>&lt;P&gt;As i have to do this code migration, i need to understand it&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 16:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563752#M158074</guid>
      <dc:creator>SanjuKumari</dc:creator>
      <dc:date>2019-06-05T16:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Meaning of a= b*(c&lt;=i&lt;=d) +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563753#M158075</link>
      <description>&lt;P&gt;&lt;SPAN&gt;i want to know what b will get multiplied with ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the value of P1 as per u .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 16:16:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563753#M158075</guid>
      <dc:creator>SanjuKumari</dc:creator>
      <dc:date>2019-06-05T16:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Meaning of a= b*(c&lt;=i&lt;=d) +1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563755#M158077</link>
      <description>Run the code and test it.</description>
      <pubDate>Wed, 05 Jun 2019 16:19:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Meaning-of-a-b-c-lt-i-lt-d-1/m-p/563755#M158077</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-05T16:19:08Z</dc:date>
    </item>
  </channel>
</rss>

