Go to the previous, next section.
The CDL data types are:
char
byte
short
long
int
float
real
double
Except for the added data-type byte
and the lack of the type
qualifier unsigned
, CDL supports the same primitive data types as
C. In declarations, type names may be specified in either upper or
lower case.
Byte
s differ from characters in that they are intended to hold
eight bits of data, and the zero byte has no special significance, as it
may for character data. Ncgen
converts byte
declarations
to char
declarations in the output C code and to the nonstandard
BYTE
declaration (or similar platform-specific declaration) in
output FORTRAN code.
Short
s can hold values between -32768 and 32767. Ncgen
converts
short
declarations to short
declarations in the output
C code and to the nonstandard INTEGER*2
declaration in output
FORTRAN code.
Long
s can hold values between -2147483648 and 2147483647.
Ncgen
converts long
declarations to long
declarations in the output C code and to INTEGER
declarations in
output FORTRAN code. In CDL declarations int
and integer
are accepted as synonyms for long
.
Float
s can hold values between about -3.4+38 and 3.4+38.
Their external representation is as 32-bit IEEE normalized
single-precision floating-point numbers. Ncgen
converts
float
declarations to float
declarations in the output C
code and to REAL
declarations in output FORTRAN code.
In CDL declarations real
is accepted as a synonym for float
.
Double
s can hold values between about -1.7+308 and 1.7+308.
Their external representation is as 64-bit IEEE standard
normalized double-precision, floating-point numbers. Ncgen
converts double
declarations to double declarations in the
output C code and to DOUBLE PRECISION
declarations in output
FORTRAN code.
Go to the previous, next section.