Re: EQUIVALENCE(variable inside module, variable outside module) ????
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Tue, 6 Dec 2005 22:01:28 -0800
kis <kisitanggang@xxxxxxxxx> wrote:
> I am trying to use EQUIVALENCE for variable which appears in a module.
> It doesn't work!!!
Hint. To get better help show exactly what you are doing and what error
message results. Don't just try to describe it.
> Is there any other Fortran command that can do the job of EQUIVALENCE
> for variables in a module?
Equivalence works perfectly fine for module variables... provided that
you use it correctly. But since you didn't show what you did, it is hard
to tell whether you used it correctly.
As a guess, perhaps you tried the equivalence in a scope where the
module was used. That won't work. You *CAN* however put an equivalence
in the module itself.
As for other ways to do the same thing.... well equivalence is used for
quite a lot of different purposes. Depends which purpose you intended.
I'm certainly not going to take all the time to explain in detail all
the possible options without having a little more data about what you
are trying to do, because I'd presumably be wasting most of the time I
spent. But a quick list of candidates includes
1. The rename option in the USE statement.
2. Pointers.
3. The transfer intrinsic.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: EQUIVALENCE(variable inside module, variable outside module) ????
- From: James Van Buskirk
- Re: EQUIVALENCE(variable inside module, variable outside module) ????
- From: kis
- Re: EQUIVALENCE(variable inside module, variable outside module) ????
- References:
- Prev by Date: Re: matrix calculation
- Next by Date: Re: F95 I/O filesize problems
- Previous by thread: EQUIVALENCE(variable inside module, variable outside module) ????
- Next by thread: Re: EQUIVALENCE(variable inside module, variable outside module) ????
- Index(es):
Relevant Pages
|