HP C Programmer's Guide (92434-90009)

54 Chapter3
Calling Other Languages
Comparing HP C and HP FORTRAN 77
Comparing HP C and HP FORTRAN 77
Table on page 55 shows the differences in storage allocation between HP C and HP
FORTRAN 77. The notes the table refers to are located after the table in the section called
"Notes on HP C and HP FORTRAN 77."
Table 3-2. HP C versus HP FORTRAN 77 Storage
HP C Type HP C Description HP FORTRAN 77 Type HP FORTRAN 77
Description
char, signed char,
char enum
1 byte, byte aligned 1 byte, 1-byte aligned
unsigned char 1 byte, byte aligned CHARACTER*1 1 byte, 1-byte aligned
short, short enum 2 bytes, 2-byte
aligned
INTEGER*2 2 bytes, 2-byte aligned
unsigned short 2 bytes, 2-byte
aligned
int, int enum 4 bytes, 4-byte
aligned
INTEGER*4 or INTEGER 4 bytes, 4-byte aligned
unsigned int 4 bytes, 4-byte
aligned
long, long enum 4 bytes, 4-byte
aligned
INTEGER*4 or INTEGER 4 bytes, 4-byte aligned
unsigned long 4 bytes, 4-byte
aligned
float 4 bytes, 4-byte
aligned
REAL or REAL*4 4 bytes, 4-byte aligned
double 8 bytes, 8-byte
aligned
REAL*8 or DOUBLE
PRECISION
8 bytes, 8-byte aligned
long double 16 bytes, 16-byte
aligned
REAL*16 16 bytes, 16-byte aligned
(See Note 1) 8 bytes, 4-byte
aligned
COMPLEX or COMPLEX*8 8 bytes, 4-byte aligned
(See Note 2) 16 bytes, 8-byte
aligned
DOUBLE COMPLEX or
COMPLEX*16
16 bytes, 8-byte aligned
enum 4 bytes, 4-byte
aligned
INTEGER*4 or INTEGER 4 bytes, 4-byte aligned
pointer to type long
pointer to type
Not available