Passing data between C and Fortran

This section describes the data types that can be passed between C and Fortran. In the C-to-Fortran passing direction, most of the data types can be passed by reference only; several can also be passed by value. In the Fortran-to-C passing direction, however, the only passing method allowed is by reference.

Under Language Environment, the term by value means that a temporary copy of the argument is passed to the called function or procedure. Any changes to the parameter made by the called routine will not alter the original parameter passed by the calling routine. Under Language Environment, the term by reference means that the actual address of the argument is passed. Any changes to the parameter made by the called routine can alter the original parameter passed by the calling routine.

This section also includes information about passing an alternate return code from Fortran to C.