Sun Studio 12: Fortran User's Guide

4.6.1 Interoperability with C Functions

The new standard for Fortran provides:

The ISO_C_BINDING module provides access to named constants that are kind type parameters representing data that is compatible with C types.

The draft standard also introduces the BIND(C) attribute. A Fortran derived type is interoperable with C if it has the BIND attribute.

This release of the Fortran 95 compiler implements these features as described in the chapter 15 of the draft standard. Fortran also provides facilities for defining derived types and enumerations that correspond to C types, as described in chapter 4 of the standard.