View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Sun Feb 18, 2018 3:02 pm Post subject: Compiler chokes on Hollerith strings in Format specification |
|
|
I hesitated before reporting the following bug (who uses Hollerith strings in Format these days?). FTN95 is not only capable of handling old style Fortran source, but even provides the /convert compiler option to modernise such source code.
Consider the following test program, which captures the issue. The actual code that triggered the bug is www.netlib.org/opt/varpro .
Code: | PROGRAM TESTING 34567890
WRITE(*,100) 0002
100 FORMAT (95H WARNING -- EXPECTED ERROR OF OBSERVATIONS IS NOT ZERO0003
+. COVARIANCE MATRIX MAY BE MEANINGLESS. /) 0004
END 0005
|
FTN95 8.10 says:
Code: | 0003) 100 FORMAT (95H WARNING -- EXPECTED ERROR OF OBSERVATIONS IS NOT ZERO0003
0004) +. COVARIANCE MATRIX MAY BE MEANINGLESS. /) 0004
*** Unknown edit descriptor '.', or missing comma |
If, however, I use /convert, rename the output file to have a ".f" suffix and compile that, the compiler gives no error messages. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sun Feb 18, 2018 6:47 pm Post subject: |
|
|
The answer to 'who uses Hollerith strings today' is 'everyone who uses or tests old code' although if it was the more precise phrase '... in new code', then perhaps it is 'almost no-one'.
I've never seen this error when developing old code of my own from the dim and distant past with Holleriths, so perhaps it is a 'regression' undiscovered as no-one before you has used a recent version of FTN95 on such old code.
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Mon Feb 19, 2018 8:54 am Post subject: |
|
|
Many thanks for the feedback.
This issue was raised quite recently with the result that v8.20 includes a "fix" which provides the compilation error "Continuation of Hollerith strings is not supported".
Eddie's remark about it possibly being a regression turns out to be (for me, unexpectedly) correct so a complete fix may not be too far away. v4.90 handles this code correctly. When I looked at this previously I couldn't see a way to fix it without major effort. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Mon Feb 19, 2018 6:42 pm Post subject: |
|
|
Thanks, Paul.
FTN77 4.03 handles such Format statements correctly. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Tue Feb 20, 2018 4:46 pm Post subject: |
|
|
This issue has been fixed so that FTN95 can now handle continued Hollerith strings. |
|
Back to top |
|
|
|