<?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: problem parsing WRITE format string with (fixed format) con in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759638#M15125</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/367365"&gt;tim18&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Evidently, you lost the formatting when you posted, so I turned it back to fixed form source.&lt;BR /&gt;You have incorrectly nested character strings. If I double the interior ' marks:&lt;BR /&gt; WRITE(*,'(1x," ***Outer Convergence of Thermal Flux (MG/P''//''W)&lt;BR /&gt; +Was", t55,2es12.5)') X,Y&lt;BR /&gt;this appears to fix it.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
I attached the original file so it keeps the formatting intact. I did follow the procedure posted by Steve on how to insert code snippets but it looks like that injection logic is way too smart and removes the leading spaces or I have to add some comment in the beginning :-). &lt;BR /&gt;</description>
    <pubDate>Fri, 02 Oct 2009 18:51:28 GMT</pubDate>
    <dc:creator>Jean_U</dc:creator>
    <dc:date>2009-10-02T18:51:28Z</dc:date>
    <item>
      <title>problem parsing WRITE format string with (fixed format) continuation</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759635#M15122</link>
      <description>I get an error message when trying to compile the following code snippet:&lt;BR /&gt;
&lt;PRE&gt;[plain]      program p
      X = 0.0D00
      Y = 1.0D00
      WRITE(*,'(1x," ***Outer Convergence of Thermal Flux (MG/P'//'W) Wa
     +s",                   t55,2es12.5)') X,Y
      end program
[/plain]&lt;/PRE&gt;
The error message I am getting is:&lt;BR /&gt;
&lt;PRE&gt;[plain]formatString.f(5): error #5120: Unterminated character constant
     +s",                   t55,2es12.5)') X,Y
-------^
formatString.f(5): error #5144: Invalid character_kind_parameter. No underscore
     +s",                   t55,2es12.5)') X,Y
----------------------------------------------^
formatString.f(4): error #5082: Syntax error, found ''' when expecting one of: ( &lt;IDENTIFIER&gt; &lt;CHAR_CON_KIND_PARAM&gt; &lt;CHAR_NAM_KIND_PARAM&gt; &lt;CHARACTER_CONSTANT&gt; &lt;INTEGER_CONSTANT&gt; ...
      WRITE(*,'(1x," ***Outer Convergence of Thermal Flux (MG/P'//'W) Wa
------------------------------------------------------------------^
formatString.f(5): error #5082: Syntax error, found CHARACTER_CONSTANT ',                   t55,2es12.5)') X,Y' when expecting one of: ( * ) :: , &lt;END-OF-STATEMENT&gt; ; + . - % (/ [ : ] /) . ** / // ...
     +s",                   t55,2es12.5)') X,Y
-------^
compilation aborted for formatString.f (code 1)
[/plain]&lt;/END-OF-STATEMENT&gt;&lt;/INTEGER_CONSTANT&gt;&lt;/CHARACTER_CONSTANT&gt;&lt;/CHAR_NAM_KIND_PARAM&gt;&lt;/CHAR_CON_KIND_PARAM&gt;&lt;/IDENTIFIER&gt;&lt;/PRE&gt;
&lt;BR /&gt;As far as I know there should not be an error. The code snippet comes from some automatic reformatting that happens as a result of source transformation. &lt;BR /&gt;</description>
      <pubDate>Thu, 01 Oct 2009 21:30:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759635#M15122</guid>
      <dc:creator>Jean_U</dc:creator>
      <dc:date>2009-10-01T21:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: problem parsing WRITE format string with (fixed format) con</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759636#M15123</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Evidently, you lost the formatting when you posted, so I turned it back to fixed form source.&lt;BR /&gt;You have incorrectly nested character strings. If I double the interior ' marks:&lt;BR /&gt; WRITE(*,'(1x," ***Outer Convergence of Thermal Flux (MG/P''//''W)&lt;BR /&gt; +Was", t55,2es12.5)') X,Y&lt;BR /&gt;this appears to fix it.&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Oct 2009 22:29:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759636#M15123</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-10-01T22:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: problem parsing WRITE format string with (fixed format) con</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759637#M15124</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/367365"&gt;tim18&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Evidently, you lost the formatting when you posted, so I turned it back to fixed form source.&lt;BR /&gt;You have incorrectly nested character strings. If I double the interior ' marks:&lt;BR /&gt; WRITE(*,'(1x," ***Outer Convergence of Thermal Flux (MG/P''//''W)&lt;BR /&gt; +Was", t55,2es12.5)') X,Y&lt;BR /&gt;this appears to fix it.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
I don't think that is really the issue because there are 2 strings: &lt;BR /&gt;1: &lt;SPAN&gt;'(1x,"***OuterConvergenceofThermalFlux(MG/P'&lt;BR /&gt;2:&lt;/SPAN&gt;&lt;SPAN&gt; 'W)Was",t55,2es12.5)'&lt;BR /&gt;(in the second I removed the newline+ continuation)&lt;BR /&gt;&lt;/SPAN&gt;Both strings delimited by apostrophe characters and concatenaded by the // operator. The fact that each of them also happens to contain a double quote character looks confusing but - as far as I understand the standard - is ok. So, in other words, changing the single quotes to double quotes around the // like tim18 did would in effect remove the // operator and instead make it part of the string. Instead of the correct output which is: &lt;BR /&gt; ***Outer Convergence of Thermal Flux (MG/PW) Was 0.00000E+00 1.00000E+00&lt;BR /&gt;the suggested change produces:&lt;BR /&gt;
&lt;PRE&gt;[cpp]  ***Outer Convergence of Thermal Flux (MG/P

W) Was                                                 0.00000E+00 1.00000E+00
[/cpp]&lt;/PRE&gt;
which clearly is wrong. &lt;BR /&gt;</description>
      <pubDate>Fri, 02 Oct 2009 18:30:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759637#M15124</guid>
      <dc:creator>Jean_U</dc:creator>
      <dc:date>2009-10-02T18:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: problem parsing WRITE format string with (fixed format) con</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759638#M15125</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/367365"&gt;tim18&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Evidently, you lost the formatting when you posted, so I turned it back to fixed form source.&lt;BR /&gt;You have incorrectly nested character strings. If I double the interior ' marks:&lt;BR /&gt; WRITE(*,'(1x," ***Outer Convergence of Thermal Flux (MG/P''//''W)&lt;BR /&gt; +Was", t55,2es12.5)') X,Y&lt;BR /&gt;this appears to fix it.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
I attached the original file so it keeps the formatting intact. I did follow the procedure posted by Steve on how to insert code snippets but it looks like that injection logic is way too smart and removes the leading spaces or I have to add some comment in the beginning :-). &lt;BR /&gt;</description>
      <pubDate>Fri, 02 Oct 2009 18:51:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759638#M15125</guid>
      <dc:creator>Jean_U</dc:creator>
      <dc:date>2009-10-02T18:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: problem parsing WRITE format string with (fixed format) con</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759639#M15126</link>
      <description>This is fixed-form source but you have named it with a .f90 file type. Change the file type to .f or .for. However, even with that the compiler seems to have a problem with this code. It is legal, as far as I can tell. I suggest rewriting it as follows:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;WRITE(*,'(1x," ***Outer Convergence of Thermal Flux (MG/P'//&lt;BR /&gt;+'W)Was",                   t55,2es12.5)') X,Y&lt;/PRE&gt;
&lt;BR /&gt;I will report this to the developers. The support ID is DPD200140398.&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Oct 2009 18:58:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759639#M15126</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-02T18:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: problem parsing WRITE format string with (fixed format) con</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759640#M15127</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;This is fixed-form source but you have named it with a .f90 file type. Change the file type to .f or .for. However, even with that the compiler seems to have a problem with this code. It is legal, as far as I can tell. I suggest rewriting it as follows:&lt;BR /&gt;&lt;BR /&gt;
&lt;/EM&gt;&lt;PRE&gt;&lt;EM&gt;WRITE(*,'(1x," ***Outer Convergence of Thermal Flux (MG/P'//&lt;BR /&gt;+'W)Was",                   t55,2es12.5)') X,Y&lt;/EM&gt;&lt;/PRE&gt;
&lt;BR /&gt;I will report this to the developers. The support ID is DPD200140398.&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Thanks for forwarding it to the developers. When I experimented with the problem I did compile it with "ifort -fixed formatString.f90" to reflect the fixed format inside.&lt;BR /&gt;&lt;BR /&gt;It seems like a contrived problem when one looks at the example but I mentioned in my post that the code is the output of a source transformation process &lt;BR /&gt;in which things like this format string concatenation are parsed as string1-operator-string2 &lt;BR /&gt;etc. and then eventually the AST is unparsed and reformatted to free or fixed format for a specified line length which leads to this strange looking but apparently syntactically correct code. &lt;BR /&gt;IOW, manually fixing the transformation output is not a feasible option.  &lt;BR /&gt;</description>
      <pubDate>Fri, 02 Oct 2009 19:16:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759640#M15127</guid>
      <dc:creator>Jean_U</dc:creator>
      <dc:date>2009-10-02T19:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: problem parsing WRITE format string with (fixed format) con</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759641#M15128</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I understand that modifying the code is difficult for you - I was just explaining how to fix it if you could. We'll fix this as soon as we can.&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Oct 2009 19:55:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759641#M15128</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-02T19:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: problem parsing WRITE format string with (fixed format) con</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759642#M15129</link>
      <description>This has been fixed in our sources - the fix should appear in Update 6 (April).</description>
      <pubDate>Thu, 11 Feb 2010 14:50:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759642#M15129</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-02-11T14:50:09Z</dc:date>
    </item>
    <item>
      <title>problem parsing WRITE format string with (fixed format) continu</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759643#M15130</link>
      <description>This issue is fixed in Update 6, available now.</description>
      <pubDate>Fri, 23 Apr 2010 19:01:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/problem-parsing-WRITE-format-string-with-fixed-format/m-p/759643#M15130</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-04-23T19:01:44Z</dc:date>
    </item>
  </channel>
</rss>

