HP Fortran Programmer's Guide (March 2010)
Calling C routines from HP Fortran
Data types
Chapter 8190
Table 8-2 shows the differences between the corresponding data types in HP Fortran and C
when compiling in 32-bit mode and in 64-bit mode. Table 8-3 shows the differences when the
Fortran program is compiled with the +autodbl option. Notice that Fortran data items that
are explicitly sized (for example, INTEGER*4) stay the same size regardless of whether they
are compiled in 32-bit mode, in 64-bit mode, or with the +autodbl option.
The following sections provide more detailed information about language differences for the
following data types:
Table 8-2 Size differences between HP Fortran and C data types
HP Fortran
data types
C data types
Sizes
(in bits)
32-bit mode 64-bit mode
INTEGER int or long int 32
INTEGER*4 int or long int 32
INTEGER*8 long long long or
long long
64
REAL float float 32
DOUBLE PRECISION double double 64
REAL*16 long double long double 128
Table 8-3 Size differences after compiling with +autodbl
HP Fortran
data types
C data types
Sizes
(in bits)
32-bit mode 64-bit mode
INTEGER long long long 64
INTEGER*4 int or long int 32
INTEGER*8 long long long 64
REAL float float 64
DOUBLE PRECISION long double long double 128
REAL*16 long double long double 128