Toby White writes:
> (Hello, Anthony)
>
> On Fri, Feb 21, 2003 at 11:51:09AM +0000, Anthony Stone wrote:
> > I have a module in which the following kind of thing appears:
>
> [snip code]
>
> > Is there a bug in my code (and perhaps in the second compiler) or a bug
> > in the first compiler? If it's my code that's wrong, how do I fix it?
>
> According to the F95 standard: section 12.3.2.2
> "If an external procedure name or a dummy procedure name is used as an actual
> argument, its interface shall be explicit or it shall be explicitly declared
> to have the EXTERNAL attribute."
>
> Which implies that the first compiler is wrong, and your code correct.
>
> Does the first compiler work if you declare func external within subroutine c?
Though I agree that his code is legal, that quote is not relevant.
The subroutine in question is *NOT* an external subroutine. It is
a module subroutine, which is a distinctly different thing; yes the
difference matters.
For the same reason, it would be illegal to declare func external. It
is not external. If you declare it to be so, then that would mean
that the module procedure was not the one intended, but that instead
the references were to some external subroutien named func. Since
there presumably isn't such an external subroutine, this would likely
fail to link, giving an undefined external error (though it should
compile ok).
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|