Richard,
What you say is correct. What shoud have been stated is "Renaming all the subroutines and functions into modules and then adding explicit interface characteristics such as the INTENT attribute will create a LOT of difficulties.". Sorry for the badly constructed and misleading statement.
In any case, this was meant to be an example for the case of legacy codes. To consider a hypothetical situation, modifying procedures as described above will forfeit the older progrms from using them. Thus, an organization would be left with two versions of the procedure - one with an explicit interface and one without !.
Further, duplication will create a heck of a lot of configuration control problems, whenever one of the library procedures is modified. In this case, both versions would have to be modified seperately, and each would have to be tested independently for fidelity !.
Cheers
Ravi
------------------
[log in to unmask] wrote
Ravi C. Venkatesan writes:
> Renaming all the subroutines and functions into a module and then
> adding an explicit interface by using the INTENT attribute will create
> a LOT of difficulties.
I'm afraid I can't quite decipher what this is trying to say. The
INTENT attribute has almost nothing to do with explicit interfaces.
They are basically orthogonal. You can have all 4 combinations of
with or without INTENT attrbutes and with or without explicit
interfaces. (Actually, you can have more than 4 combinations because
you can have the INTENT attribute on some arguments, while omitting it
from others). Using the an INTENT attribute certainly doesn't do
anything like "add an explicit interface". I tried a couple of
interpretations of what this might be trying to say. My best guess is
that the bit about the INTENT attribute is irrelevant and this is
basically trying to say that you will have problems if you put all
your procedures into modules. I could easily be completely wrong,
though.
If that is the intended message, then I disagree with it as a general
statement. Indeed, for new code, I do put almost all procedures in
modules. For existing f77 code, there can be difficulties in
conversion to module procedures in some cases, but it works quite
easily in many others. I think it at best an overgeneralization to
suggest without qualification that it will create a lot of
difficulties. It may in some cases; in others, it is almost
painless, requiring little more than changing the END statements,
which can be done by an automated script.
--
Richard Maine | Good judgement comes from experience;
[log in to unmask] | experience comes from bad judgement.
| -- Mark Twain
|