<?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 result is 1 for %put %eval( 1000.1 LE 1000.1);? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/why-result-is-1-for-put-eval-1000-1-LE-1000-1/m-p/80518#M17337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also note ... because of the decimal point, %EVAL is forced to make a character comparison.&amp;nbsp; (As was noted, %EVAL can perform arithmetic with integers only.)&amp;nbsp; This expression would also return 1 because of the decimal point:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%eval( 9. &amp;gt; 80)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since %sysevalf can perform non-integer arithmetic, this expression returns 0:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%sysevalf( 9. &amp;gt; 80)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Apr 2012 13:06:59 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2012-04-12T13:06:59Z</dc:date>
    <item>
      <title>why result is 1 for %put %eval( 1000.1 LE 1000.1);?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-result-is-1-for-put-eval-1000-1-LE-1000-1/m-p/80516#M17335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%put %eval( 1000.1 LE 1000.1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how does sas treat 1000.1 in this case?&lt;/P&gt;&lt;P&gt;Why it becomes 1 when running sas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 22:10:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-result-is-1-for-put-eval-1000-1-LE-1000-1/m-p/80516#M17335</guid>
      <dc:creator>ZRick</dc:creator>
      <dc:date>2012-04-11T22:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: why result is 1 for %put %eval( 1000.1 LE 1000.1);?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-result-is-1-for-put-eval-1000-1-LE-1000-1/m-p/80517#M17336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%EVAL generally only understands integers. The comparison value of the LE statement is what you have asked %EVAL to report. SAS will return 1 for true and 0 for false as it doesn't have an actuall Boolean data type. So 1000.1 is less than or equal to 1000.1 and the result is 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you change to LT for strictly less than you would get a result of 0 since the comparison would be false.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 23:19:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-result-is-1-for-put-eval-1000-1-LE-1000-1/m-p/80517#M17336</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-04-11T23:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: why result is 1 for %put %eval( 1000.1 LE 1000.1);?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-result-is-1-for-put-eval-1000-1-LE-1000-1/m-p/80518#M17337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also note ... because of the decimal point, %EVAL is forced to make a character comparison.&amp;nbsp; (As was noted, %EVAL can perform arithmetic with integers only.)&amp;nbsp; This expression would also return 1 because of the decimal point:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%eval( 9. &amp;gt; 80)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since %sysevalf can perform non-integer arithmetic, this expression returns 0:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%sysevalf( 9. &amp;gt; 80)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2012 13:06:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-result-is-1-for-put-eval-1000-1-LE-1000-1/m-p/80518#M17337</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-04-12T13:06:59Z</dc:date>
    </item>
  </channel>
</rss>

