forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compiler chokes on Hollerith strings in Format specification

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 874

PostPosted: Sun Feb 18, 2018 3:02 pm    Post subject: Compiler chokes on Hollerith strings in Format specification Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1773
Location: Yateley, Hants, UK

PostPosted: Sun Feb 18, 2018 6:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5294
Location: Salford, UK

PostPosted: Mon Feb 19, 2018 8:54 am    Post subject: Reply with quote

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
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 874

PostPosted: Mon Feb 19, 2018 6:42 pm    Post subject: Reply with quote

Thanks, Paul.

FTN77 4.03 handles such Format statements correctly.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5294
Location: Salford, UK

PostPosted: Tue Feb 20, 2018 4:46 pm    Post subject: Reply with quote

This issue has been fixed so that FTN95 can now handle continued Hollerith strings.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group