char
byte
short
int
long
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.
The byte type differs from the char type in that it is intended for eight-bit data, and the zero byte has no special significance, as it may for character data. The ncgen utility converts byte declarations to char declarations in the output C code and to BYTE, INTEGER*1, or similar platform-specific declaration in output FORTRAN code.
The short type holds values between -32768 and 32767. The ncgen utility converts short declarations to short declarations in the output C code and to INTEGER*2 declaration in output FORTRAN code.
The ushort type is an unsigned short type. It holds values between 0 and 65536.
The int type can hold values between -2147483648 and 2147483647. The ncgen utility converts int declarations to int declarations in the output C code and to INTEGER declarations in output FORTRAN code. In CDL declarations integer and long are accepted as synonyms for int.
The uint type is an unsigned int type. It holds values between 0 and 4294967296.
The int64 is an 8-byte signed integer. It can hold values between -9223372036854775808 and 9223372036854775807.
The uint64 is an unsigned 8-byte integer type. It can hold values between 0 and 18446744073709551616.
The float type can hold values between about -3.4+38 and 3.4+38, with external representation as 32-bit IEEE normalized single-precision floating-point numbers. The ncgen utility 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.
The double type can hold values between about -1.7+308 and 1.7+308, with external representation as 64-bit IEEE standard normalized double-precision, floating-point numbers. The ncgen utility converts double declarations to double declarations in the output C code and to DOUBLE PRECISION declarations in output FORTRAN code.
The string type holds variable length strings.
The bool type holds boolean values.