Reference: fortran_types.h

Overview

fortran_types.h defines the following typedefs to provide the C equivalent to a Fortran intrinsic type:

ftn_int_t
is a Fortran INTEGER value
ftn_real_t
is a Fortran REAL value
ftn_cmplx_t
is a structure ({ftn_real_t real, imag;}) representing a Fortran COMPLEX value
ftn_double_t
is a Fortran DOUBLE PRECISION value
ftn_dcmplx_t
is a structure ({ftn_double_t real, imag;}) representing a Fortran DOUBLE COMPLEX value
ftn_char_t
is a Fortran CHARACTER
ftn_logical_t
is a Fortran LOGICAL

The typedef, ftn_length_t, is defined to represent the type used for the hidden length arguments which are passed when character arrays are passed as arguments to a function or are returned by a function.

The macro function, FTN_IS_FALSE(x), is defined to convert a Fortran logical value into true or false as represented in C.

If ive_fortran.h is included, there is no need to include fortran_types.h since all of the above are provided in ive_fortran.h as well.

Bugs

The current implementation of fortran_types.h expects a number of preprocessor macros to be set which explicitly set what the types are. It should be modified to expects a preprocessor macro to be set to describe the target C and Fortran environment and then determines the equivalent types automatically.


| categories | alphabetical |


modified June 22, 2001

Eric Branlund (eric@msg.ucsf.edu)