replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - FTN95 fails to compile code with ASSIGNED GOTO
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 

FTN95 fails to compile code with ASSIGNED GOTO
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
LitusSaxonicum



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

PostPosted: Sat Mar 10, 2018 2:56 pm    Post subject: Reply with quote

If the feature (ASSIGNed GOTO) was actually deleted in Fortran 95 et seq., then it is retained in a Fortran 95 compiler only as a favour to users, and isn't strictly legal, code-compliant, Fortran 95. (I say 'if' because that's what I read in various websites, but it may not be correct).

I think my position on retaining old features is clear, but then an ASSIGNed GOTO was always a rather crass thing in the first place, and surely has never been a commonplace feature of most people's source code.

Now there's something about the name FTN95 that may be of relevance here, but I can't put my finger on it just now. I wonder what it is?

Eddie
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1899

PostPosted: Sat Mar 10, 2018 5:06 pm    Post subject: Reply with quote

Eddie, I don't think that I can do better than to repost an exchange on this very question between two rather prominent people recently. One (A) is the author of a text book on Fortran published by Springer. The other (B) is a member of the Fortran Standards committee.

A wrote:
In the 25+ years since F90, it has been replaced by several newer standards, and therefore implementing something in an F90 compiler seems to be a waste of effort, especially since (a) the code is useless, and (b) the code is now illegal.


B wrote:
(a) doesn't matter to customers (b) is incorrect. It may not be valid F2003 or later, but in the real world, compilers that don't properly handle F77 and later are market failures. I'd go so far as to add F66 to that. As I wrote, a compiler that claims to support F90 needs to be able to correctly process any valid F90 source.


Some current Fortran compilers let you specify -std=f77, -std=f90, -std=f95, etc., thereby controlling which standard is used in deciding the warnings and error messages to issue.

Even if one wishes to redeem oneself by removing ASSIGN from a legacy code, exorcising the ASSIGNed GOTOs requires a compiler that can compile the old code correctly, if one wishes to have some assurance that the modified code gives the same results as the old code.

We have, in fact, two failed compilers that prove the point made by "B". Both were subsets of Fortran 90/95: Lahey's ELF90, and Imagine1's F.
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Sat Mar 10, 2018 9:54 pm    Post subject: Reply with quote

Springer seem to have published quite a few books on Fortran ...
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1899

PostPosted: Mon Mar 12, 2018 1:53 pm    Post subject: Re: Reply with quote

John-Silver wrote:
... to be strictly true shouldn't that message have ... "in ftn95" at the end ? ... as I thought it runs ok in other compilers.

It is not easy for a compiler to emit a meaningful and pertinent error message. For the test program that I posted, the NAG compiler says:
Code:
Obsolescent: salasg.f, line 1: Fixed source form
Deleted feature used: salasg.f, line 14: ASSIGN statement
Error: salasg.f, line 14: ASSIGN to function name KA is not supported

which is very well said. On the other hand, the venerable F2C from AT&T Bell Labs says:
Code:
salasg.f:
   MAIN tasg:
   ka:
Error on line 12 of salasg.f: out_asgoto:  bad expr

This tells me where the problem is, but the rest of it may be understandable only to the compiler writers.
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
Goto page Previous  1, 2
Page 2 of 2

 
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