(j3.2006) Interesting F2003-ism

Bill Long longb
Thu Feb 22 17:06:49 EST 2007



Aleksandar Donev wrote:

>Bill Long wrote:
>  
>
>>Suppose, for the example above, the user writes (in Fortran) subroutines 
>>p_A and p_B
>>    
>>
>You can suppose that but I certainly do not recommend that such a thing 
>be allowed. As Van pointed out, I specifically was talking about interfaces.
>

The interface confers the EXTERNAL attribute on the procedure described 
in the interface.  No different than for an actual subroutine 
definition.  The question is whether we allow two such procedures to 
have the same binding name.  In the present standard, the answer is no.


>
>We have talked within the context of the Assumed-shape Interop TR of 
>allowing the same C procedure to have several Fortran interfaces, as 
>this is crucial for allowing the same descriptor to be used independent 
>of TKR info for the array arguments. It is also useful in existing F2003 
>to allow one to sometimes call a C procedure with a scalar and other 
>times with an array actuals (something people do all the time):
>
>INTERFACE X BIND(C,NAME="X")
>   interface x1(p)
>     real :: p
>   end interface
>   interface x2(p)
>     real :: p(*)
>   end interface
>END INTERFACE X
>
>This is all fine and nice but it does not provide anything for the case 
>I was talking about when there are two interfaces in different modules! 
>It is about basic name-space management.
>
>The LANG="" idea sounds good to me, it would help with both issues. But 
>I do claim that this is not F2013 or whatever, it is Interop TR! 
>

The interop TR is for assumed-shape, allocatable, pointer, and optional 
dummy arguments.  The capability discussed above has nothing to do with 
any of those attributes.   Gluing a bunch of other stuff on the edges is 
not part of the TR's assignment and not what was voted by WG5.  Sorry, 
this is NOT part of the TR.  It is a proposal for the next standard.


>We must 
>have it for the TR to make any practical sense...
>

The TR makes a lot of practical sense to me without this new stuff. 

Cheers,
Bill


-- 
Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120

            

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://j3.scs.gmu.edu/pipermail/j3/attachments/20070222/a9054196/attachment.html 



More information about the J3 mailing list