Silverfrost Forums

Welcome to our forums

Common

8 Nov 2008 6:23 #3989

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.

9 Nov 2008 4:39 #3991

Hi Sid,

By any chance are the variables declared to be of different size (e.g. real4 in one routine and real8 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

Please login to reply.