[MPI3 Fortran] Summary of items on the table

Bill Long longb at cray.com
Mon Apr 28 19:27:38 CDT 2008



Aleksandar Donev wrote:
> On Monday 28 April 2008 12:12, Craig Rasmussen wrote:
>
>   
>> 3. Map void* to type(C_VOID) defined in the ISO_C_BINDING intrinsic
>> module and add LANG=C to the Fortran standard. 
>>     
>
>   
>> 4. Add an IGNORE attribute with parameters T (type) K (kind) R (rank)
>> for BIND(C) interfaces.  This pretty much (as I understand it) does
>> the same thing as #3
>>     
> Assuming both are restricted to BIND(C) interfaces only, 

I'm guessing that you mean bind(c) interfaces that are limited by a new 
LANG="C" specifier to be for functions actually written in C.  In 
general, bind(c) interfaces can, and often are, for routines actually 
written in Fortran.


> an important 
> difference, in my mind, is that #3 above only addresses TK mismatch. Rank 
> mismatch, strided arrays, dope vectors, and anything other than type is 
> covered by existing Fortran rules, whether they be good or bad. It is exactly 
> as it is for CLASS(*) dummy arguments in Fortran 2003, the only difference is 
> that no type descriptor would be passed to C, only an address.
>   

CLASS(*) is an enormous beast.  Overloading the same syntax with 
something like "only an address" has two drawbacks I can see.  Using the 
same syntax for such radically different concepts would be confusing to 
users (and a pain to write into the Fortran standard), and it precludes 
(however unlikely) that sometime in the future we might want to actually 
support interoperability of unlimited polymorphic entities.  I think the 
original option 3 is better than class(*).  At least the syntax makes it 
clear what is intended.

Cheers,
Bill

> Aleks
>   

-- 
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

            




More information about the mpiwg-fortran mailing list