<?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 A LOGICAL variable is neither .TRUE. nor .FALSE. !! in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/A-LOGICAL-variable-is-neither-TRUE-nor-FALSE/m-p/1002186#M103924</link>
    <description>&lt;P&gt;I have a very strange behavior in my code where&amp;nbsp;the following statement succeeds&lt;/P&gt;

&lt;P&gt;[fortran]&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;IF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt; (&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;comp_E&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;) &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;THEN&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;[/fortran]&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;even&amp;nbsp;though the&amp;nbsp;LOGICAL variable comp_E&amp;nbsp;has the value .FALSE. (which is correct and&amp;nbsp;I can verify in the VS debugger). If&amp;nbsp; I try to change the statement into&lt;/P&gt;

&lt;P&gt;[fortran]&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;IF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt; (&amp;nbsp;.NOT. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;comp_E)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;THEN&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;[/fortran]&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;just as a test to see if the value is actually opposite, i.e. .TRUE., it *always* fails.&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;To sum up: an IF statement with the variable comp_E either always fails or always succeds. Strange!&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;Does anyone have a clue what is going on here?&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;I'm on &lt;/FONT&gt;Intel(R) Visual Fortran Compiler XE 13.1.3.198 [IA-32] and the compiler command line switches are&lt;/P&gt;

&lt;P&gt;/nologo /debug:full /Od&amp;nbsp; [....]&amp;nbsp; /free /standard-semantics /Qdiag-error-limit:50 /debug-parameters:all /warn:declarations /warn:unused /warn:interfaces /fpe:0 /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc110.pdb" /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /c&lt;/P&gt;</description>
    <pubDate>Fri, 25 Apr 2014 16:52:57 GMT</pubDate>
    <dc:creator>Espen_M_</dc:creator>
    <dc:date>2014-04-25T16:52:57Z</dc:date>
    <item>
      <title>A LOGICAL variable is neither .TRUE. nor .FALSE. !!</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/A-LOGICAL-variable-is-neither-TRUE-nor-FALSE/m-p/1002186#M103924</link>
      <description>&lt;P&gt;I have a very strange behavior in my code where&amp;nbsp;the following statement succeeds&lt;/P&gt;

&lt;P&gt;[fortran]&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;IF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt; (&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;comp_E&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;) &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;THEN&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;[/fortran]&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;even&amp;nbsp;though the&amp;nbsp;LOGICAL variable comp_E&amp;nbsp;has the value .FALSE. (which is correct and&amp;nbsp;I can verify in the VS debugger). If&amp;nbsp; I try to change the statement into&lt;/P&gt;

&lt;P&gt;[fortran]&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;IF&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt; (&amp;nbsp;.NOT. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;&lt;FONT color="#ff9f9f" face="Consolas" size="2"&gt;comp_E)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&lt;FONT color="#dcdcdc" face="Consolas" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;THEN&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;[/fortran]&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;just as a test to see if the value is actually opposite, i.e. .TRUE., it *always* fails.&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;To sum up: an IF statement with the variable comp_E either always fails or always succeds. Strange!&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;Does anyone have a clue what is going on here?&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#569cd6" face="Consolas" size="2"&gt;I'm on &lt;/FONT&gt;Intel(R) Visual Fortran Compiler XE 13.1.3.198 [IA-32] and the compiler command line switches are&lt;/P&gt;

&lt;P&gt;/nologo /debug:full /Od&amp;nbsp; [....]&amp;nbsp; /free /standard-semantics /Qdiag-error-limit:50 /debug-parameters:all /warn:declarations /warn:unused /warn:interfaces /fpe:0 /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc110.pdb" /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /c&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2014 16:52:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/A-LOGICAL-variable-is-neither-TRUE-nor-FALSE/m-p/1002186#M103924</guid>
      <dc:creator>Espen_M_</dc:creator>
      <dc:date>2014-04-25T16:52:57Z</dc:date>
    </item>
  </channel>
</rss>

