Re: Declaration order
- From: *** Hendrickson <***.hendrickson@xxxxxxx>
- Date: Sat, 09 May 2009 16:01:58 GMT
David Flower wrote:
On May 9, 12:15�pm, ma...@xxxxxxxxxxxxxxxx wrote:No, that's not it. "myn" is in common. It would help if you'dThe following part of Fortran code compiles with Intel v10.x and g95
but not with Compaq v6.6:
real*8 �myVal(myn)
integer �myn
common /myCommon/ myn
The declaration of the array comes before the declaration of its
dimension which comes through a common block. Any takes?
This is illegal code unless you also have a PARAMETER statement
supplying the value of myn
Dave Flower
give the error message. But, I believe it's an ordering
problem. You're using "myn" before you've completely
declared it. Compaq v6.6 is a relatively old compiler and
the rules for how things must be ordered in the declarations
have changed over the years. I don't remember for sure what
is what here, and a quick look at the standard didn't help.
It will surely work if you move the real statement to be after the
common statement.
You might also try turning on standards conformance for both
g95 and v10.x and see if they are letting you get away with
something.
*** Hendrickson
.
- Follow-Ups:
- Re: Declaration order
- From: makis
- Re: Declaration order
- References:
- Declaration order
- From: makis
- Re: Declaration order
- From: David Flower
- Declaration order
- Prev by Date: Re: Declaration order
- Next by Date: Re: Fortran by-reference, was Re: A doubly linked-list in C
- Previous by thread: Re: Declaration order
- Next by thread: Re: Declaration order
- Index(es):