(j3.2006) Intrinsic modules

Craig Dedo craig
Mon Nov 30 11:21:22 EST 2009

	Yes, there is a reason.  Both the Fortran 2003 standard and the
Fortran 2008 draft have a normative rule prohibiting circular module
references.  It's not a constraint, but regular, normative text.  The rule
says, "A module shall not reference itself, either directly or indirectly."
Here are the references:
	Fortran 2003 (03-007, 11.2.1p1, 253:8)
	Fortran 2008 (09-007r3, 11.2.2p1, 272:22-23)

Craig T. Dedo
17130 W. Burleigh Place
P. O. Box 423                         Mobile Phone:  (414) 412-5869
Brookfield, WI   53008-0423    E-mail:  <craig at ctdedo.com>
Linked-In:  http://www.linkedin.com/in/craigdedo

-----Original Message-----
From: j3-bounces at j3-fortran.org [mailto:j3-bounces at j3-fortran.org] On Behalf
Of Kurt W Hirchert
Sent: Sunday, November 29, 2009 22:21
To: van.snyder at jpl.nasa.gov; fortran standards email list for J3
Subject: Re: (j3.2006) Intrinsic modules

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 

J3 mailing list
J3 at j3-fortran.org

More information about the J3 mailing list