HP C/iX Reference Manual (31506-90011)
146 Chapter9
HP C/iX Implementation Topics
Data Types
Data Types
Data types are implemented in HP C/iX as follows:
• The char type is signed.
• All types can have the register storage class, although it is only honored for scalar
types. Ten register declarations per function are honored. More are honored when the
+R option is used.
• The signed integer types are represented internally using twos complement form.
• Structures (and unions) start and end on the alignment boundary of their most
restrictive member.
Table 9-1 lists the sizes and ranges of different HP C/iX data types.
Refer to the
HP C Programmer's Guide
for comparisons of data storage and alignment on
the following computer systems:
• HP 3000 Series 900
• HP 3000/V
• HP 9000 Series 300/400
• HP 9000 Series 700/800
Table 9-1. HP C/iX Data Types
Type Bits Bytes Low Bound High Bound Comments
char 8 1 -128 127 Character
signed char 8 1 -128 127 Signed integer
unsigned char 8 1 0 255 Unsigned integer
short 16 2 -32,768 32,767 Signed integer
unsigned
short
16 2 0 65,535 Unsigned integer
int 32 4 -2,147,483,648 2,147,483,647 Signed integer
unsigned int 32 4 0 4,294,967,295 Unsigned integer
long 32 4 -2,147,483,648 2,147,483,647 Signed integer
unsigned long 32 4 0 4,294,967,295 Unsigned integer
float 32 4 See (a) below. See (b) below. Floating-point
double 64 8 See (c) below. See (d) below. Floating-point
long double 128 16 See (e) below. See (f) below. Floating-point
enum 32 4 -2,147,483,648 2,147,483,647 Signed integer