(j3.2006) Intrinsic modules

Craig Dedo craig
Tue Dec 1 18:09:16 EST 2009


Oops.  My bad.  You are absolutely right.  There is no circular reference.

Sincerely,
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>
USA
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: Monday, November 30, 2009 18:07
To: fortran standards email list for J3
Subject: Re: (j3.2006) Intrinsic modules

That is certainly a fine rule, but where do you see circularity in this 
code snippet?

the rest of Van's code references nonintrinsic IEEE_Arithmetic
nonintrinsic IEEE_Arithmetic references nonintrinsic IEEE_Arithmetic_
nonintrinsic IEEE_Arithmetic_ references intrinsic IEEE_Arithmetic

Where's the circular reference?

-Kurt

Craig Dedo wrote:
> Everyone:
> 	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)
>
> Sincerely,
> 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>
> USA
> 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 
> choosing.)
>
> -Kurt
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
>
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
>
>   

_______________________________________________
J3 mailing list
J3 at j3-fortran.org
http://j3-fortran.org/mailman/listinfo/j3




More information about the J3 mailing list