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 

Common

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



Joined: 02 Sep 2008
Posts: 210

PostPosted: Sat Nov 08, 2008 7:23 pm    Post subject: Common Reply with quote

I have a large program consisting of several Fortran subroutines. One of the routines calls an entry point into another subroutine. I noticed that even though I have a number of variables declared as "common" in both routines, when I enter into the called entry point, the "common" variables do not have the values that I entered with. Do I also need to place the "common" block after the entry point to share the same values for all of the variable declared at the top of both subroutines? Please let em know, Sid Kraft.
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Sun Nov 09, 2008 5:39 pm    Post subject: Reply with quote

Hi Sid,

By any chance are the variables declared to be of different size (e.g. real*4 in one routine and real*8 in another)? Check that the common block(s) list variables of the same type and length - this can go wrong in old code when you use implicit type in one and explicit type in another, etc.

The common blocks must go before any executable statements, which pretty much rules out comining after an ENTRY.

Eddie
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 -> Plato 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