FORTRAN Reference Manual

FORTRAN Reference Manual528615-001
D-1
D
Data Type Correspondence and
Return Value Sizes
The following tables contain the return value size generated by HP language compilers
for each data type. Use this information when you need to specify values with the
Accelerator ReturnValSize option. These tables are also useful if your programs use
data from files created by programs in another language, or your programs pass
parameters to programs written in callable languages.
Refer to the appropriate NonStop SQL programmers guide for a complete list of SQL
data type correspondence. Also note that the return value sizes given in these tables
do not correspond to the storage size of SQL data types.
If you are using the Data Definition Language (DDL) utility to describe your files, you
might not need this table. For more information, refer to the Data Definition Language
(DDL) Reference Manual.
Note. COBOL includes COBOL 74, COBOL85, and SCREEN COBOL unless otherwise noted.
Table D-1. Integer Types, Part 1 (page 1 of 2)
8-Bit Integer 16-Bit Integer 32-Bit Integer
BASIC STRING INT
INT(16)
INT(32)
C char [1]
unsigned char
signed char
int
short
unsigned
long
unsigned long
COBOL Alphabetic
Numeric DISPLAY
Alphanumeric-Edited
Alphanumeric
Numeric-Edited
PIC S9(n) COMP or PIC
9(n) COMP without P or
V, 1 n 4
Index Data Item [2]
NATIVE-2 [3]
PIC S9(n) COMP or PIC
9(n) COMP without P or
V, 5 n 9
Index Data Item [2]
NATIVE-4 [3]
FORTRAN INTEGER
[4]
INTEGER*2 INTEGER*4
Pascal BYTE
Enumeration,
unpacked,
256 members
Subrange, unpacked,
n…m, 0 n and m 255
INTEGER
INT16
CARDINAL [1]
BYTE or CHAR value
parameter
Enumeration, unpacked,
> 256 members
Subrange, unpacked,
n…m, -32768 n and m
32767, but at least n or m
outside 0…255 range
LONGINT
INT32
Subrange, unpacked
n…m, –2147483648 £ n
and m 2147483647,
but at least n or m
outside -32768…32767
range