MPI Forum Meetings logo

MPI Forum: mpi3-fortran Mailing List Archives

all MPI Forum: mpi3-fortran mailing list

Subject: Re: [MPI3 Fortran] Summary of items on the table
From: Bill Long (longb_at_[hidden])
Date: 2008-04-28 20:27:38


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_[hidden]
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120