Different languages have differing fundamental data types on which they can operate. FORTRAN has the types INTEGER, REAL, DOUBLE PRECISION, COMPLEX, LOGICAL and CHARACTER. The only aggregate data type that it supports is the array, although a character variable can store many characters. C supports the fundamental types int, float, double, char, and void. It also allows int to be modified by the type specifiers short or long, signed or unsigned, char to be modified by signed or unsigned and double to be modified by long. However, on any given machine, some of the short, normal and long types may be represented in the same way. C also provides a range of pointer types which may, for purposes of interchange with FORTRAN, all be condensed into the generic pointer type void*. Note that, unlike FORTRAN, a C character variable can only store a single character. Also unlike FORTRAN, a C character variable is treated as a type of integer rather than as a separate type. Finally, ANSI C has the type enum, an enumerated list of values. The aggregate data types are the array, structure and union. New types can be defined in terms of the basic types by means of a typedef statement.
When writing mixed language programs, it is clearly important to know which FORTRAN types map on to which C types; in particular, which similar types use the same amount of storage. This is discussed more fully in the machine dependent sections ; however, there are some general points to be considered first.
CNF and F77 Mixed Language Programming -- FORTRAN and C