HP 3000 Manuals

Data Types [ HP C/iX Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Reference Manual

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 |
|                |                |                |                |                |                |
-------------------------------------------------------------------------------------------------------

Comments 

In the following comments, the low bounds of float, double, and long
double data types are given in their normalized and denormalized forms.
Normalized and denormalized refer to the way data is stored.  Normalized
numbers are represented with a greater degree of accuracy than
denormalized numbers.  Denormalized numbers are very small numbers
represented with fewer significant bits than normalized numbers.

a.  Least normalized:     1.17549435E-38F
    Least denormalized:  1.4012985E-45F

b.  3.40282347E+38F

c.  Least normalized:      2.2250738585072014E-308
    Least denormalized:  4.9406564584124654E-324

d.  1.7976931348623157E+308

e.  Least normalized:
    3.3621031431120935062626778173217526026E-4932L

    Least denormalized:
    6.4751751194380251109244389582276465525E-4966L

f.  1.1897314953572317650857593266280070162E+4932L



MPE/iX 5.0 Documentation