- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://software.intel.com/en-us/forums/showthread.php?t=68767
except it now does not required fixed format and occurs with ifort Version 12.0.3.
Compiling the attached example produces:
ForTests/CompCheck> ifort formatString2.f90
formatString2.f90(2): error #5145: Invalid blank/tab
WRITE(*,'(10x,"**** CALCULATIO'//'N **** Num. of nuclides)&
---------------------------------------------------------^
formatString2.f90(3): error #5120: Unterminated character constant
&")')
--------------^
formatString2.f90(2): error #5082: Syntax error, found ''' when expecting one of: (
WRITE(*,'(10x,"**** CALCULATIO'//'N **** Num. of nuclides)&
-----------------------------------------^
compilation aborted for formatString2.f90 (code 1)
Note that - as in the previous thread - the double quotes are just internal to the string and the // operator should concatenate the 2 strings delimited by single quotes. The placement of the concatenation and the line continuation in this particular output are the result of an automatic source transformation and I believe are syntactically correct. The attached file is formatString2.f90
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[bash]WRITE(*,'(10x,"**** CALCULATIO'//'N **** Num. of nuclides)'& &//'")')
[/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 If a character context is to be continued, an & shall be the last nonblank character on the line and
4 shall not be followed by commentary. There shall be a later line that is not a comment; an & shall be
5 the first nonblank character on the next such line and the statement continues with the next character
6 following that &.
I will escalate this to the developers. - issue ID is DPD200169704. However, I personally find continued character constants distasteful and would suggest using concatenation as Jim suggests.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page