<?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 %eval return an boolean value, how? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/eval-return-an-boolean-value-how/m-p/55983#M11918</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone give an example of %eval that returns a boolean value, true/false?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In sas help, it says "If at least one operand cannot be interpreted as numeric, the expression is treated as logical."&lt;/P&gt;&lt;P&gt;But it doesn't give an example,&amp;nbsp; I tried following:&lt;/P&gt;&lt;P&gt;%eval('0'+1); &lt;/P&gt;&lt;P&gt;it returned an error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't think of one example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Apr 2012 16:00:41 GMT</pubDate>
    <dc:creator>ZRick</dc:creator>
    <dc:date>2012-04-04T16:00:41Z</dc:date>
    <item>
      <title>%eval return an boolean value, how?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/eval-return-an-boolean-value-how/m-p/55983#M11918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone give an example of %eval that returns a boolean value, true/false?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In sas help, it says "If at least one operand cannot be interpreted as numeric, the expression is treated as logical."&lt;/P&gt;&lt;P&gt;But it doesn't give an example,&amp;nbsp; I tried following:&lt;/P&gt;&lt;P&gt;%eval('0'+1); &lt;/P&gt;&lt;P&gt;it returned an error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't think of one example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 16:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/eval-return-an-boolean-value-how/m-p/55983#M11918</guid>
      <dc:creator>ZRick</dc:creator>
      <dc:date>2012-04-04T16:00:41Z</dc:date>
    </item>
    <item>
      <title>%eval return an boolean value, how?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/eval-return-an-boolean-value-how/m-p/55984#M11919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use %SYSEVALF if you want to enforce the format of the returned value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%sysevalf(4+5,boolean) will return 1 instead of 9.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 16:06:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/eval-return-an-boolean-value-how/m-p/55984#M11919</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-04-04T16:06:04Z</dc:date>
    </item>
    <item>
      <title>%eval return an boolean value, how?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/eval-return-an-boolean-value-how/m-p/55985#M11920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also simulate the result, using %EVAL.&amp;nbsp; This expression also returns a 1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%eval ( (4+5) ne 0)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, %SYSEVALF will also return 0 for calculated missing values.&amp;nbsp; %EVAL returns an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also note that %EVAL is still limited to integer arithmetic.&amp;nbsp; These expressions return different results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%sysevalf(4/5, boolean)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%eval( (4/5) ne 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps, rather than confuses the issue!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 16:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/eval-return-an-boolean-value-how/m-p/55985#M11920</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-04-04T16:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: %eval return an boolean value, how?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/eval-return-an-boolean-value-how/m-p/55986#M11921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example. hth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New; font-size: 10pt;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New; font-size: 10pt;"&gt;%eval&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;( 1.0 eq 1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;%&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-family: Courier New; font-size: 10pt;"&gt;*-- returns 0 for false -- *;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 18:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/eval-return-an-boolean-value-how/m-p/55986#M11921</guid>
      <dc:creator>chang_y_chung_hotmail_com</dc:creator>
      <dc:date>2012-04-05T18:03:05Z</dc:date>
    </item>
  </channel>
</rss>

