(j3.2006) (SC22WG5.5472) J3/15-159 - J3 Fortran interp letter ballot #33 - due 24-Apr-2015
Bader, Reinhold
Reinhold.Bader
Thu Apr 23 16:35:47 EDT 2015
Hello all,
concerning Bills following comment
>
> Comment for F08/0128:
>
> The discussion in this interp illustrates why the argument in 09-141
> was wrong. I think a better answer for this interp is that passing
> 09-141 was a mistake and it is being corrected by reinstating the
> prohibition on a submodule using its ancestor. An alternative, but
> equivalent answer, is that there is no rational reason to allow use of
> its ancestor module in a submodule, and the failure to prohibit this
> is an error in the standard.
>
I agree that there is no need to allow use access to any entity from the ancestor
module in a submodule. However, I consider the following not only reasonable,
but also quite often necessary:
module mod_a
type :: a
...
end type
end module
module mod_b
use mod_a
type :: b
type(a) :: a
end type
end module
submodule(mod_a) :: submod
use mod_b, only : b
end submodule
This, I think, would also be prohibited if the old restriction is reinstated. The feature request that
I handed in ended up as 08-154r1, but subsequently triggered an UTI, as far as I recall. Is there
any way to retain the above example as conforming? Note that the ONLY clause implies that no
entity from the ancestor module is accessed; any access to "a" inside the submodule would work via
host association.
Cheers
Reinhold
More information about the J3
mailing list