Re: Simple question regarding IMPLICIT NONE in a module


Richard Maine wrote:
Paul van Delst <paul.vandelst@xxxxxxxx> wrote:

I would like to double check that specifying
at the start of a module applies to all contained subprograms.

Sort of (though I don't happen to like the term "contained subprogram",
but that's not relevant here; module procedures and internal procedures
are different enough that I think it generally unhelpful to lump them
together based on one of the very few things they do have in common -
that they both have a host).

Dick pointed out one big gotcha - that interface bodies are different
from everything else in this regard.

Let me mention one other. It doesn't sound like it applies to your case,
but the exact wording of your question does suggest to me that there
might still be potential for confusion. Dick's quotation did cover the
matter, but it is sort of buried.

The implicit none (or any other implicit mapping) from a host is only
the default. So putting an implicit none at the module scope doesn't
guarantee that implicit none will apply to all of the module procedures.
It is the default, but an implicit statement in one of the module
procedures can override it. If you are dealing with 3rd-party code, it
might be worth grepping for any other occurances of "implicit" in the
module. If it is your own code, and you know that you wouldn't have done
anything like that, then that's different.

It is our own code and there are no other implicit statements in the module.

As another post in this thread pointed out, this is a compiler bug. Use of later versions of the XLF compiler solved the

And I learned a bit more about the subtlety of the implicit statement (e.g. I was not aware of the exception for
interface bodies.)