Re: a weird COMMON fact
- From: mecej4 <mecej4.nyetspam@xxxxxxxxxxxxx>
- Date: Sun, 11 Jul 2010 12:05:42 -0500
analyst41@xxxxxxxxxxx wrote:
I have been running code foreever that had
common /name1/var1,var2
common /name1/var3,var4,var5
in the same sub-program.
A common block can be declared in pieces. Your two pieces are equivalent to
common /name1/var1,var2,var3,var4,var5
The intent was, of course, to call the second common /name2/.
I corrected it and the results are still the same, because
var3,var4,var5 occur only in that sub-program (I haven't gotten round
to doing whatever I was planning to do with var3-5.)
Why doesn't the compiler (Lahey) flag this as an error or at least as
a warning?
There is no reason to, since a many-piece COMMON statement is allowed, even
it it is not commonly used.
-- mecej4
.
- References:
- a weird COMMON fact
- From: analyst41@xxxxxxxxxxx
- a weird COMMON fact
- Prev by Date: Re: IDE for ifort on Linux
- Next by Date: Re: problem with linking calcomp library
- Previous by thread: Re: a weird COMMON fact
- Next by thread: Re: a weird COMMON fact
- Index(es):
Relevant Pages
|