(j3.2006) (SC22WG5.3586) OPTIONAL arguments and C interop

Bill Long longb
Wed Jul 16 14:25:57 EDT 2008

Van Snyder wrote:
> On Wed, 2008-07-16 at 09:47 -0500, Bill Long wrote:
>> A side effect of this design is that OPTIONAL and VALUE cannot be both
>> specified for a particular dummy argument.

Sorry, I should have said that the above restriction would apply only 
for interfaces with BIND(C).

> Bill:
> I don't understand this problem.
> I would think that processors could use their Fortran conventions for
> argument forms that don't exist in C, i.e., assumed-shape arrays,
The TR is adding these as interoperable.

> optional arguments, 

And these.

> and optional+value arguments. 

But not these.  For non-Bind(C) interfaces, vendors would continue with 
their current implementation for this case.

>  The TR would specify
> functions or structs to access and create such arguments.  Preferably
> functions, so that vendors can provide them according to their Fortran
> conventions, instead of changing their Fortran conventions to conform to
> structs specified by the TR for the BIND(C) case.

Yes, that's the basic plan for assume-shape, allocatable, and pointer 
arguments.  At least to the extent that the vendor's current mechanisms 
supply enough information to populate the structs on the C side.


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

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 J3 mailing list