Re: Use'ing two functions with same name

In article <42bdbd16$0$18640$14726298@xxxxxxxxxxxxxxx>,
Madhusudan Singh <spammers-go-here@xxxxxxxxxxxx> wrote:

> where func is a function defined in both modules.
> Of course, if the modules above are written by the same person, this
> situation would never occur, but what happens if the two modules are
> supplied by different commercial vendors ? Is using a rename list in the
> use statement the only way to solve such a problem ?

Yes. Or an ONLY list if you don't need both functions. You can "hide"
the rename in an intermediate module if that helps.

I'm slightly puzzled as to why you asked, since you found the solution.
Would you expect different solutions or is there some particular
shortcoming to this one? Or were you just asking on general principles
to see if there was a feature you were unaware of?

The only other kind of option I can imagine would be a way to explicitly
specify in the reference that you wanted the one from a particular
module. I've heard of things along that general line, but Fortran
doesn't (currently) have such a verbose option.

P.S. I assume that the function is not generic. With generics there is
at least a chance that it might "just work". But that seems to be a
"solution" limited to a vanishingly small set of cases. Both vendors
have to have a generic of the same name - and the two generic sets have
to manage to "fit" together. If we were talking intentional planning,
that's one thing, but that this would happen by circumstance - well, I
doubt it will be common enough to merit describing it as a "solution".

Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain