HP 3000 Manuals

Compiler Library Data Types [ Compiler Library/XL Reference Manual ] MPE/iX 5.0 Documentation


Compiler Library/XL Reference Manual

Compiler Library Data Types 

Table 1-1 below shows the corresponding data types between HP Pascal,
HP FORTRAN 77/XL, HP COBOL II/XL and HP C/XL.


NOTE Many of the examples shown in this document are written in Pascal and are described in terms of Pascal and Pascal data types.
Table 1-1. Corresponding Data Types ------------------------------------------------------------------------------------------------- | | | | | | HP Pascal | HP FORTRAN 77/XL | HP COBOL II/XL | HP C/XL | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | LONGREAL | DOUBLE PRECISION | Not applicable | double | | | or REAL*8 | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | SHORTINT | INTEGER*2 | PIC S9 through | short | | | | | | | | | PIC S9999 COMP | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | REAL | REAL or REAL*4 | Not applicable | float | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | INTEGER | INTEGER or | PIC S9(5) through | int | | | INTEGER*4 | | | | | | PIC S9(9) COMP | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | TYPE | COMPLEX or | Not applicable | typedef struct{ | | complex=RECORD | COMPLEX*8 | | float realpart; | | realpart:REAL; | | | float imagpart; | | imagpart:REAL: | | | }COMPLEX; | | END; | | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | complex_matx= | COMPLEX | Not applicable | COMPLEX | | ARRAY [1..N,1..N] | complex_matx | | complex_matx | | of complex | (N,N) | | [N][N]; | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | longreal_matx= | DOUBLE PRECISION | Not applicable | double | | ARRAY [1..N,1..N] | longreal_matx | | longreal_matx | | of LONGREAL | (N,N) | | [N][N]; | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | real_matx= | REAL real_matx | Not applicable | float real_matx | | ARRAY [1..N,1..N] | (N,N) | | [N][N]; | | of REAL | | | | | | | | | -------------------------------------------------------------------------------------------------


MPE/iX 5.0 Documentation