Home > Archive > Fortran > December 2005 > Re: EQUIVALENCE(variable inside module, variable outside module)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: EQUIVALENCE(variable inside module, variable outside module)
|
|
| glen herrmannsfeldt 2005-12-08, 3:58 am |
| Michael Metcalf wrote:
(snip)
> In the version that works, x is a module variable that is accessed by use
> association in test. (Note that USE is not INCLUDE, so it is x that is
> accessed, and not the common block such that the two commons statements
> together represent a concatenation, as another poster suggested.) The
> physical location is determined by x's presence in the common. The physical
> location of i is similarly determined, and, voilą, they're in the same
> place.They are storage associated.
I would have thought COMMON in different scoping units would not be
concatenated, as they are in the same scoping unit.
> The version that doesn't work violates the rule that variables in different
> scoping units may not be equivalenced together. x is in eqiv_mod, and i in
> test (MR&C, end of Section 20.2.2).
-- glen
| |
| glen herrmannsfeldt 2005-12-08, 3:58 am |
| Richard Maine wrote:
> glen herrmannsfeldt <gah@ugcs.caltech.edu> wrote:
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
> They aren't, but on very carefully reading Mike's post, I think you just
> misparsed his statement. That's easy to do. I also misparsed it the
> first time, but had trouble believing that Mike would get that wrong.
> On rereading, I think he got it right, but just wrote a sentence that
> was a little hard to parse.
> In particular, I think the "not" in Mike's sentence also is intended to
> apply to the "such that the two common statements together represent a
> concatenation".
After reading it a few more times I can almost believe it.
..NOT. usually has a higher precedence than some other operators,
and there weren't any parentheses, either. (Commas might help, too.)
-- glen
|
|
|
|
|