(j3.2006) Intrinsic modules
Kurt W Hirchert
hirchert
Sun Nov 29 23:20:44 EST 2009
Van Snyder wrote:
>
> I wouldn't have this problem if I could write
>
> module IEEE_Arithmetic
>
> use, intrinsic :: IEEE_Arithmetic
>
> end module IEEE_Arithmetic
>
> but that's prohibited by 09-007r3:16.3.1p2.
>
> This is one of several reasons I advocated to allow a local name (and
> intrinsic module names are local names) to be the same as the name of
> a module in which it appears.
Is there any reason you couldn't write
module IEEE_Arithmetic_
use, intrinsic :: IEEE_Arithmetic
end module IEEE_Arithmetic_
module IEEE_Arithmetic
use :: IEEE_Arithmetic_
end module IEEE_Arithmetic
This appears to avoid violating the cited rule, but it still gets all
the public entities from the intrinsic module IEEE_Arithmetic into a
nonintrinsic module of the same name. (If you find using the name
IEEE_Arithmetic_ confusing, you can substitute any other name of your
choosing.)
-Kurt
More information about the J3
mailing list