Richard,
Yes, explicit <-> external.
RV
[log in to unmask] wrote
Ravi C. Venkatesan writes:
> What shoud have been stated was "Renaming all the subroutines and
> functions into a module and then adding explicit interface
> characteristics such as the INTENT attribute will create a LOT of
> difficulties." This makes a heck of a lot more sense.
The terminology is still a bit confused. Renaming doesn't have much
of anything to do with putting procedures in modules. One just puts
the procedure in the module. If, for some reason, you want to rename
a procedure, then you can do that, but that has little to do with
whether or not one puts it in a module.
And INTENT is just irrelevant here. Your terminology confuses that
issue. INTENT is not an "explicit interface characteristic". It is
just an interface characteristic, independent of whether or not the
interface is explicit.
> 2 versions of the code and thus two versions of the procedure. One
> would possess an external interface and one without. This is because
> duplication would undoubtedly create tremendous configration control
> problems
Well, yes. Here I finally think I see what you were saying. I think
you obscured the point by going into too much detail of specific
cases. I would agree very generally with the statement that
maintaining multiple versions of codes is a big pain. It now seems to
me that this is your main point. (I often end up explaining this to
people who ask me to rewrite some of my libraries in whatever their
favorite language of the day is - my position is that I'll write and
support wrappers to allow applications in multiple languages to use
the library, but I won't maintain multiple versions of the library
itself).
This point *IS* quite general. It applies to almost any kind of
modification that would end up making you maintain multiple copies
of code.
So yes, if you have an existing library that will continue to be used
by f77 codes, it is likely to be best to keep that library as is and
add a separate module with interface blocks for the procedures.
This is much like the way I write wrappers to facilitate the use of my
libraries. (Even though I'm usually writing the wrappers the other
way - to make it easy for C or f77 codes to use my f90 modules).
Indeed, you may not even have the source code for the library at all.
P.S. Terminology again. It's an explicit interface, not an external
interface. "External" just describes a procedure that is not a module
or internal procedure. An external procedure might or might not have
an explicit interface (you need to write an interface body if you want
to give it one). Module procedures always have an explicit interface,
but by definition they are not external procedures. Indeed, it seems
that what you are suggesting is that you *DO* want to keep the
procedures as external procedures (i.e. you aren't putting them in
a module), but you also want to give them explicit interfaces (by
putting interface bodies in a module, which you then USE). That's
quite reasonable...once I figure out when you really mean "explicit"
and when you really mean "external".
--
Richard Maine | Good judgement comes from experience;
[log in to unmask] | experience comes from bad judgement.
| -- Mark Twain
|