<?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: Multiple Condition Evaluation - Compaq 6 v Intel 10 in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841550#M59519</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I believe you need to modify the code. Take a look at this (one of many) &lt;A href="https://community.intel.com/en-us/forums//topic/42309"&gt;post&lt;/A&gt; related to evaluating IF in IVF and CVF. Steve already explained it very clearly several times.&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;</description>
    <pubDate>Mon, 13 Aug 2007 03:18:34 GMT</pubDate>
    <dc:creator>ArturGuzik</dc:creator>
    <dc:date>2007-08-13T03:18:34Z</dc:date>
    <item>
      <title>Multiple Condition Evaluation - Compaq 6 v Intel 10</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841549#M59518</link>
      <description>&lt;FONT face="Courier New"&gt;&lt;FONT size="2"&gt;Hi -&lt;BR /&gt;&lt;BR /&gt;We are currently moving some code from Compaq 6 to Intel 10 and I am having difficulty with a particular item of code in a subroutine provided by a supplier.&lt;BR /&gt;&lt;BR /&gt;My issue concerns multiple conditions in 'do while' or 'if' type statements. The code in question follows.&lt;BR /&gt;&lt;BR /&gt;i = len( b )&lt;BR /&gt;do while( i.ge.1 .and. b(i:i).eq.' ' )&lt;BR /&gt; i = i - 1&lt;BR /&gt;enddo&lt;BR /&gt;&lt;BR /&gt;Let's assume that b = ' ', a four character string in which all characters are blank spaces. In the code above, 'i' will eventually become 0 (which is the desired result), and then the last time that the 'do while' evaluates the conditions, it will see i.ge.1 (0.ge.1 = FALSE) and b(i:i).eq.' ' (b(0).eq. ' ' ---&amp;gt; ERROR, subscript less than 1). Now, I can think of better ways to write this particular item so that I don't get this error, but because it is part of larger code provided by a third party I'd rather not modify it. Yes, I can ask them to modify it but that is a whole other story.&lt;BR /&gt;&lt;BR /&gt;My question is this (and I'm sure I'm not the first to ask), but why is the second condition evaluated at all if the first condition is FALSE?&lt;BR /&gt;&lt;BR /&gt;If I compile/run the code in CVF6 I have no issue here and the code completes correctly. However, if I compile/run in IVF10, I get the subscript less than 1 error. Am I correct in assuming that this is being caused by the compiler? If so, is there a setting that I am missing in IVF10 that would turn off evaluation of 'downstream' conditions if the first turns out to be FALSE?&lt;BR /&gt;&lt;BR /&gt;My apologies for being long winded but thanks in advance for any assistance.&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Mon, 13 Aug 2007 01:49:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841549#M59518</guid>
      <dc:creator>m_cash_stramel</dc:creator>
      <dc:date>2007-08-13T01:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Evaluation - Compaq 6 v Intel 10</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841550#M59519</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I believe you need to modify the code. Take a look at this (one of many) &lt;A href="https://community.intel.com/en-us/forums//topic/42309"&gt;post&lt;/A&gt; related to evaluating IF in IVF and CVF. Steve already explained it very clearly several times.&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Aug 2007 03:18:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841550#M59519</guid>
      <dc:creator>ArturGuzik</dc:creator>
      <dc:date>2007-08-13T03:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Evaluation - Compaq 6 v Intel 10</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841551#M59520</link>
      <description>&lt;FONT face="Courier New"&gt;&lt;FONT size="2"&gt;Thank you for the link. I assummed this was a topic that would have been well covered. I just wasn't able to come up with the correct combination of keywords in my search on this forum.&lt;BR /&gt;&lt;BR /&gt;I had actually just found and entirely different thread on the same topic on usenet.&lt;BR /&gt;&lt;BR /&gt;Anyway, as I said above, the code is not mine. It is provided by a third party supplier and I was looking for a quick and easy way to avoid going to them to fix their code.&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Mon, 13 Aug 2007 03:47:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841551#M59520</guid>
      <dc:creator>m_cash_stramel</dc:creator>
      <dc:date>2007-08-13T03:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Evaluation - Compaq 6 v Intel 10</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841552#M59521</link>
      <description>There is no "quick and easy" way - the code is illegal and broken and must be fixed.&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Aug 2007 14:46:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841552#M59521</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-13T14:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Evaluation - Compaq 6 v Intel 10</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841553#M59522</link>
      <description>&lt;P&gt;The programmer apparently wasthinking C/C++ boolian expression evaluation rules were in effect whereas Fortran rules are in effect. If you do change the code the replace the 4 statements with&lt;/P&gt;
&lt;P&gt;i = LEN_TRIM( b )&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2007 19:02:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiple-Condition-Evaluation-Compaq-6-v-Intel-10/m-p/841553#M59522</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2007-08-13T19:02:30Z</dc:date>
    </item>
  </channel>
</rss>

