<?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: format syntax error in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875822#M73820</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/321656"&gt;Luis&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;&lt;BR /&gt;Yes, in my first post I should have written compiler, not debugger&lt;BR /&gt;&lt;BR /&gt;In my little program a is a character&lt;BR /&gt;&lt;BR /&gt;program main&lt;BR /&gt;character(len=5) a; a='foo' ; print a&lt;BR /&gt;end program&lt;BR /&gt;&lt;BR /&gt;but the compiler does not catch any error, as expected the program crash when I run it.&lt;BR /&gt;&lt;BR /&gt;It really is a bug when I was writing a code, I Do not expect the statement works in a different way.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Oh!!... That makes a lot of difference when you say 'debugger' instead of 'complier'. &lt;BR /&gt;&lt;BR /&gt;Possibly it might be expecting a namelist, while it is compiling; when you debug it gets upset since it wasnt namelist ! Thesyntax for Print for namelist is &lt;BR /&gt;&lt;STRONG&gt;print nml&lt;BR /&gt;&lt;/STRONG&gt;where&lt;BR /&gt;&lt;STRONG&gt;nml&lt;/STRONG&gt;=Is the nonkeyword form of a namelist specifier (no NML=) indicating namelist formatting.&lt;BR /&gt;&lt;BR /&gt;This might be a possibility only!</description>
    <pubDate>Tue, 24 Mar 2009 22:40:23 GMT</pubDate>
    <dc:creator>Peter</dc:creator>
    <dc:date>2009-03-24T22:40:23Z</dc:date>
    <item>
      <title>format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875814#M73812</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;By default the debugger does not detect the format error &lt;BR /&gt;&lt;BR /&gt;print a ! instead print *,a&lt;BR /&gt;&lt;BR /&gt;I have inspected the project properties and can not find how to change this</description>
      <pubDate>Sat, 21 Mar 2009 16:27:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875814#M73812</guid>
      <dc:creator>Luis2</dc:creator>
      <dc:date>2009-03-21T16:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875815#M73813</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/321656"&gt;Luis&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;Hi&lt;BR /&gt;&lt;BR /&gt;By default the debugger does not detect the format error &lt;BR /&gt;&lt;BR /&gt;print a ! instead print *,a&lt;BR /&gt;&lt;BR /&gt;I have inspected the project properties and can not find how to change this&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Luis,&lt;BR /&gt;&lt;BR /&gt;What compiler are you using??? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 21 Mar 2009 22:03:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875815#M73813</guid>
      <dc:creator>Peter</dc:creator>
      <dc:date>2009-03-21T22:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875816#M73814</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;I think it will be hard for the compiler (any compiler) to detect your intentions here as the print statement has changed with standards:&lt;BR /&gt;&lt;BR /&gt;print a&lt;BR /&gt;&lt;BR /&gt;suggests using a as the format -- no longer do formats have to be numbers and format statements. With some compiler settings, you would probably get an error at runtime.&lt;BR /&gt;&lt;BR /&gt;Linda&lt;BR /&gt;</description>
      <pubDate>Sun, 22 Mar 2009 15:07:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875816#M73814</guid>
      <dc:creator>lklawrie</dc:creator>
      <dc:date>2009-03-22T15:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875817#M73815</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I'm using ivf 10.1&lt;BR /&gt;&lt;BR /&gt;The error is trivial. Simply, I was surprised that is not detected at compile time.&lt;BR /&gt;&lt;BR /&gt;Perhaps an formated output can not be detected,but I thought that&lt;BR /&gt;&lt;BR /&gt;print a&lt;BR /&gt;&lt;BR /&gt;is an easily detectable error&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 22 Mar 2009 20:51:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875817#M73815</guid>
      <dc:creator>Luis2</dc:creator>
      <dc:date>2009-03-22T20:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875818#M73816</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;variable a could just as easily be defined as "('type this here')"&lt;BR /&gt;&lt;BR /&gt;and thus print a would produce:&lt;BR /&gt;&lt;BR /&gt;type this here &lt;BR /&gt;&lt;BR /&gt;on the output line.&lt;BR /&gt;&lt;BR /&gt;in old style fortran, any kind of variable could hold a string. that's why i say it might be detected during runtime but not perhaps during compile time.&lt;BR /&gt;&lt;BR /&gt;Linda&lt;BR /&gt;</description>
      <pubDate>Sun, 22 Mar 2009 21:37:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875818#M73816</guid>
      <dc:creator>lklawrie</dc:creator>
      <dc:date>2009-03-22T21:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875819#M73817</link>
      <description>When I compile this program:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[plain]      print a
      end[/plain]&lt;/PRE&gt;
I get:&lt;BR /&gt;&lt;BR /&gt;t.f90(1): error #6304: This format specifier must be of type INTEGER. &lt;A&gt;&lt;BR /&gt; print a&lt;BR /&gt;------------^&lt;BR /&gt;compilation aborted for t.f90 (code 1)&lt;BR /&gt;&lt;BR /&gt;The syntax of the PRINT statement is:&lt;BR /&gt;&lt;BR /&gt;PRINT &lt;EM&gt;format &lt;/EM&gt;[, &lt;EM&gt;output-item-list]&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Now here's where it gets interesting. When you look at the F2003 standard, format is allowed to be one of:&lt;BR /&gt; 
&lt;UL&gt;
&lt;LI&gt;default-char-expr&lt;/LI&gt;
&lt;LI&gt;label&lt;/LI&gt;
&lt;LI&gt;*&lt;/LI&gt;
&lt;/UL&gt;
If it's a character expression (could be a variable), then the expression contains a format string. Label and * are obvious. But what's this about INTEGER? F2003 doesn't allow that.&lt;BR /&gt;&lt;BR /&gt;But.. F77 does! In F77 (and F90), format is allowed to be an integer variable that has been ASSIGNed a label. Assigned GOTO and labels has been deleted from the language, but Intel Fortran still supports it. If I declare variable a to be an integer and compile with standards checking, I get this:&lt;BR /&gt;&lt;BR /&gt;t.f90(2): warning #7358: Assigned FORMAT specifiers have been deleted in Fortran 2003.   &lt;/A&gt;&lt;A&gt;&lt;BR /&gt; print a&lt;BR /&gt;-----------^&lt;BR /&gt;t.f90(2): error #5503: Variable 'A' has not been assigned a label in this program unit.&lt;BR /&gt; print a&lt;BR /&gt;-----------^&lt;BR /&gt;&lt;BR /&gt;But I note that if I don't ask for standards checking, I still get the second error.&lt;BR /&gt;&lt;BR /&gt;So.. I assume that in Luis' program, variable a is declared character. Depending on what is in that character string, one might see almost anything at output, though usually you should see a "format syntax error". And indeed that's the title of this thread. &lt;BR /&gt;&lt;BR /&gt;I would not expect the debugger to do anything with this. The program should generate a run-time error.&lt;/A&gt;</description>
      <pubDate>Mon, 23 Mar 2009 19:49:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875819#M73817</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-03-23T19:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875820#M73818</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Certain compilers, such as gfortran, will check the contents of a constant format string at compile time. Some of those checks happen with ifort only at run time, perhaps only when -check format has been set at compile time, and only when use of the format is attempted. The run-time check has the advantage of applying to variable as well as constant formats, but the disadvantage of not catching problems not exposed by a test run. The function of the debugger would be to help determine what led up to the problem, perhaps not needed in the present case.&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Mar 2009 20:04:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875820#M73818</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-03-23T20:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875821#M73819</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;I would not expect the debugger to do anything with this. The program should generate a run-time error.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Yes, in my first post I should have written compiler, not debugger&lt;BR /&gt;&lt;BR /&gt;In my little program a is a character&lt;BR /&gt;&lt;BR /&gt;program main&lt;BR /&gt;character(len=5) a; a='foo' ; print a&lt;BR /&gt;end program&lt;BR /&gt;&lt;BR /&gt;but the compiler does not catch any error, as expected the program crash when I run it.&lt;BR /&gt;&lt;BR /&gt;It really is a bug when I was writing a code, I Do not expect the statement works in a different way.</description>
      <pubDate>Tue, 24 Mar 2009 21:14:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875821#M73819</guid>
      <dc:creator>Luis2</dc:creator>
      <dc:date>2009-03-24T21:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875822#M73820</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/321656"&gt;Luis&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;&lt;BR /&gt;Yes, in my first post I should have written compiler, not debugger&lt;BR /&gt;&lt;BR /&gt;In my little program a is a character&lt;BR /&gt;&lt;BR /&gt;program main&lt;BR /&gt;character(len=5) a; a='foo' ; print a&lt;BR /&gt;end program&lt;BR /&gt;&lt;BR /&gt;but the compiler does not catch any error, as expected the program crash when I run it.&lt;BR /&gt;&lt;BR /&gt;It really is a bug when I was writing a code, I Do not expect the statement works in a different way.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Oh!!... That makes a lot of difference when you say 'debugger' instead of 'complier'. &lt;BR /&gt;&lt;BR /&gt;Possibly it might be expecting a namelist, while it is compiling; when you debug it gets upset since it wasnt namelist ! Thesyntax for Print for namelist is &lt;BR /&gt;&lt;STRONG&gt;print nml&lt;BR /&gt;&lt;/STRONG&gt;where&lt;BR /&gt;&lt;STRONG&gt;nml&lt;/STRONG&gt;=Is the nonkeyword form of a namelist specifier (no NML=) indicating namelist formatting.&lt;BR /&gt;&lt;BR /&gt;This might be a possibility only!</description>
      <pubDate>Tue, 24 Mar 2009 22:40:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875822#M73820</guid>
      <dc:creator>Peter</dc:creator>
      <dc:date>2009-03-24T22:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875823#M73821</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I already explained that this program is perfectly valid Fortran syntax, which is why the compiler did not complain. It thought you had a run-time format string in variable A. Since you didn't, you got an error at run-time.&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Mar 2009 23:35:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875823#M73821</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-03-24T23:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: format syntax error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875824#M73822</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV id="result_box" style="text-align: left;" dir="ltr"&gt;I understand&lt;/DIV&gt;
&lt;BR /&gt;program main&lt;BR /&gt;character(len=5) a&lt;BR /&gt;a='("foo")'&lt;BR /&gt;print a ! foo&lt;BR /&gt;end program&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV id="result_box" style="text-align: left;" dir="ltr"&gt;Thank you&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Sat, 28 Mar 2009 15:29:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/format-syntax-error/m-p/875824#M73822</guid>
      <dc:creator>Luis2</dc:creator>
      <dc:date>2009-03-28T15:29:07Z</dc:date>
    </item>
  </channel>
</rss>

