(j3.2006) Multiple & on free-form continuation?
Lionel, Steve
steve.lionel
Wed Aug 27 14:57:41 EDT 2014
Ian Harvey sent me the following amusing source:
PRINT "(A)", 'There is something ' & &
// 'wrong with this statement.'
END
and noted that Intel Fortran failed to diagnose this as an error. I can read
the words in the standard as not disallowing this. 3.3.2.4 says:
If a noncharacter context is to be continued, an "&" shall be the last
nonblank character on the line, or the last nonblank character before an
"!".
An & is the last nonblank character, just not the only &. I don't see any
words that prohibit multiple "&" characters at the end of a continued line.
gfortran doesn't like this one.
Also interesting:
PRINT "(A)", "Is there something & &
& wrong with this statement?"
Intel Fortran accepts this and treats the first & as an ordinary character -
gfortran does the same, and I think I can justify this from the text in
paragraph 4.
Is the first case interp fodder?
Steve Lionel
Intel Developer Support
Merrimack, NH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20140827/2b46b513/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6616 bytes
Desc: not available
Url : http://mailman.j3-fortran.org/pipermail/j3/attachments/20140827/2b46b513/attachment.bin
More information about the J3
mailing list