replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Fortran 77 compatibility?
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 

Fortran 77 compatibility?

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



Joined: 14 May 2009
Posts: 29

PostPosted: Tue May 19, 2009 10:15 pm    Post subject: Fortran 77 compatibility? Reply with quote

I have seen a post or two mentioning that FTN95 has support for Fortran 77. Do I have to set some setting for that to kick in?

The reason I ask is that we are currently using Microsoft Developer PowerStation and have $DECLARE, STRUCTURE, and RECORD statements(and I'm sure many, many more) that are generating errors in FTN95 in Visual Studio.

So, again is there some compiler or build setting that I need to or can set?
Back to top
View user's profile Send private message
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Wed May 20, 2009 7:49 am    Post subject: Reply with quote

Silverdan,

By default, standard conforming Fortran77 is a sub-set of Fortran95. It is written into the Fotran95 standard, to which Silverfrost FTN95 adheres. Thus any standard Fortran77 source code will compile without any alteration using FTN95.

The problem you are seeing is that your source code is NOT written using the Fortran77 standard. The statements that give you trouble are extensions to the standard, specific to the fortran compiler used when they were written.

You may have a lot of work on your hands converting the source code to standard fortran77, unless anyone else has any better ideas?
Back to top
View user's profile Send private message Visit poster's website
silverdan



Joined: 14 May 2009
Posts: 29

PostPosted: Wed May 20, 2009 11:22 am    Post subject: Reply with quote

Yeah, that makes sense. Thanks for the info.
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Thu May 21, 2009 5:38 pm    Post subject: Reply with quote

The $DECLARE metacommand isn't part of Fortran. Looking at a manual for a different version of Microsoft Fortran (5.1 ... and there were at least 2 "Powerstation" versions afterwards) this metacommand causes an error or warning message to be emitted at first use of an undeclared variable (error if IMPLICIT NONE is given, otherwise warning). FTN95 has something similar via the /UNDEF compiler option, so the $DECLARE you can safely delete.

As far as RECORD, STRUCTURE, UNION go, the Fortran Committee in its wisdom did not see fit to carry this established system of creating and using composite data types, and instead, devised a new way (in my view because it looked like a variant on COMMON, and they wanted something that looked like MODULE). There is a general similarity between the old (not in Fortran 77 but widely available) and the new (definitely in the Fortran 90 and 95 standards) methods.

You can get info on how to change your code into Fortran-90 style here:

http://gcc.gnu.org/onlinedocs/gfortran/STRUCTURE-and-RECORD.html

Eddie

[/url]
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