(j3.2006) (SC22WG5.4417) [ukfortran] WG informal ballot

John Reid John.Reid
Wed Mar 23 04:30:24 EDT 2011


David Muxworthy wrote:

....

> 5. A contrary view
> 5.1 The original project specification, N1667, was to extend the
> functionality of passing Fortran arguments to C.

I don't think this is correct. It says
"C interoperability in the Fortran Standard provides a mechanism to 
share data between  Fortran and C.  However, it is still necessary for 
users to implement a translation layer for procedures that have data 
pointer, allocatable, assumed-shape array, or optional dummy arguments. 
This work item will provide additional mechanisms that allow C functions 
to directly handle such Fortran dummy arguments."

and f08 says (15.1)
"Fortran provides a means of referencing procedures that are de
fined by 
means of the C programming language or procedures that can be described 
by C prototypes as de
ned in 6.7.5.3 of ISO/IEC 9899:1999, even if they
are not actually de
fined by means of C. Conversely, there is a means of 
specifying that a procedure defi
ned by a Fortran subprogram can be 
referenced from a function de
ned by means of C."

I see the importance of both Fortran calling C and vice-versa. For 
example, my group at RAL is looking to make C interfaces available to 
our Fortran HSL procedures.

Cheers,

John.



More information about the J3 mailing list