A significant number of applications use C, C++, and Fortran together, by
calling each other or sharing files. It is currently easier to modify
data sizes and types on the C side than the on Fortran side of such
applications. The following table lists C and C++ types and the
equivalent Fortran types in the different modes.
Table 5. Equivalent C/C++ and Fortran data types
C/C++ type | Fortran type | |
---|---|---|
32-bit | 64-bit | |
signed int | INTEGER | INTEGER |
signed long | INTEGER | INTEGER*8 |
unsigned long | LOGICAL | LOGICAL*8 |
pointer | INTEGER | INTEGER*8 |
POINTER (4 bytes) | ||
POINTER*8 (8 bytes) |