- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Can anyone see a problem with the following output statement
WRITE( 10 , "(I5,',F',17(',',F12.5))" ) I_Sim , &
SimAvg%Flat%Year , (SimAvg%Flat%Quarter(Quarter) , Quarter=1,4) , &
(SimAvg%Flat%Month(Month),Month=1,12)
This works fine in 11.0.072 but 11.1.038 bitterly complains with
d:\john\Documents\Projects\RSE\src\simulation_engine.f90(657): error #6181: An extra comma appears in the format list. [,,F,]
d:\john\Documents\Projects\RSE\src\simulation_engine.f90(657): error #6181: An extra comma appears in the format list. [,,F]
Also, is there any reason why I can't compile a file by right clicking in the Solution Explorer in VS2008? This was a nice feature in VS2005.
Thanks
John
Can anyone see a problem with the following output statement
WRITE( 10 , "(I5,',F',17(',',F12.5))" ) I_Sim , &
SimAvg%Flat%Year , (SimAvg%Flat%Quarter(Quarter) , Quarter=1,4) , &
(SimAvg%Flat%Month(Month),Month=1,12)
This works fine in 11.0.072 but 11.1.038 bitterly complains with
d:\john\Documents\Projects\RSE\src\simulation_engine.f90(657): error #6181: An extra comma appears in the format list. [,,F,]
d:\john\Documents\Projects\RSE\src\simulation_engine.f90(657): error #6181: An extra comma appears in the format list. [,,F]
Also, is there any reason why I can't compile a file by right clicking in the Solution Explorer in VS2008? This was a nice feature in VS2005.
Thanks
John
Link Copied
10 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
John,
This may have nothing to do with it but your format descriptor uses 17(... but you are supplying 16 variables to write. Try changing 17 to 16 and see what happens.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jimdempseyatthecove
John,
This may have nothing to do with it but your format descriptor uses 17(... but you are supplying 16 variables to write. Try changing 17 to 16 and see what happens.
Jim Dempsey
No it's ok - 12 months + 4 quarters + 1 year = 17 items (plus the integer)
I put the format into some test code I use and it compiled ok with IVF 10.1.025 -though I didn't use types just plain real arrays.
Ihave VS2008 and right click on my test code gave me a compile option in the popup menu. If you don't see it you could always addthe compile iconto a toolbar (I added it to my Build toolbar ) or use ctrl-F7
so I'm not sure what the cause of the error is (probably a bug in 11.1).
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Les,
Apparently we went to different counting schools
[cpp]WRITE( 10 , "(I5,',F',17(',',F12.5))" ) ... [/cpp]
The year is printed using the I5, leaving the 4 quarters and 12 months (16 values)
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In any case providiing "extra" format information should be completely harmless, and is a pretty common thing
to do. Like this case:
write(10,'(31I4)') (IDATA(imonth,J),J=1,ndays(imonth))
where ndays(imonth)could be 28,29,30, or 31
Quoting - jimdempseyatthecove
Les,
Apparently we went to different counting schools
[cpp]WRITE( 10 , "(I5,',F',17(',',F12.5))" ) ... [/cpp]
The year is printed using the I5, leaving the 4 quarters and 12 months (16 values)
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jimdempseyatthecove
Les,
Apparently we went to different counting schools
[cpp]WRITE( 10 , "(I5,',F',17(',',F12.5))" ) ... [/cpp]
The year is printed using the I5, leaving the 4 quarters and 12 months (16 values)
Jim
Re: my mental arithmatic. Nothing would suprise me but - What about the I_SIM integer on the same line as the write statement ;-)
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
John, I cannot reproduce this error. Could you perhaps paste a small complete reproducer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Kevin Davis (Intel)
John, I cannot reproduce this error. Could you perhaps paste a small complete reproducer?
Hi Kevin,
If I replace the line with
WRITE( * , "(I5,',F',17(',',F12.5))" ) 3 , (1.0,C1=1,17)
I still get error #6181: An extra comma appears in the format list. [,,F,]
A new project (see below), builds OK and produces the expected output. I will keep digging into this
PROGRAM Main
INTEGER :: C1
WRITE( * , "(I5,',F',17(',',F12.5))" ) 3 , (1.0,C1=1,17)
END PROGRAM Main
Thanks
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Kevin Davis (Intel)
John, I cannot reproduce this error. Could you perhaps paste a small complete reproducer?
Any chance you're using the preprocessor on your original source?
- Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sounds like perhaps a project setting is at play since the new project doesn't exhibit the error. Maybe a quick visual comparison of each project's Properties > Fortran > Command Line setting will shed some light.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or maybe you pasted the code from a Word document which changed the quote character?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page