C/C++ Programmer's Guide (G06.25+)
C and C++ Extensions
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
2-21
Data Types
decimal
The data type decimal is an HP extension. decimal is applicable only for the native
C and TNS C languages, which use the pragma SQL.
decimal specifies the predefined decimal type, which is used to access data in an
SQL database. If you use decimal, you must specify the SQL pragma. If you want
functions to manipulate decimal variables, you must specify the SQL pragma and
include the header sqlh. For information regarding the use of the data type decimal,
refer to the NonStop SQL/MP Programming Manual for C.
long long
The data type long long is a 64-bit integer. long long is an HP extension. long
long is applicable for the native and TNS C and C++ languages.
For TNS C++, type matching occurs for initialization, expressions, and argument lists.
Variables of type long long are allowed in all contexts that TNS C allows them.
Constants of type long long are recognized when the decimal number is followed by
the modifier LL or ll. Variables and constants of type long long are allowed in
classes and templates.
unsigned long long
The data type unsigned long long is an unsigned 64-bit integer. unsigned long
long is an HP extension. unsigned long long is applicable only for the TNS/E
native C and C++ languages.
signed char
The data type signed char is an HP extension to Cfront, the TNS C++ preprocessor.
The data type signed char can be used to distinguish a specific instance of an
overloaded member function.
Size of Type int
For native C and C++, the data type int is always 32 bits.
For TNS OSS programs, the data type int is always 32 bits. For TNS Guardian
programs, the size of the data type int can be 16 bits or 32 bits, depending on
whether you have specified the 32-bit (wid) data model. To specify the 32-bit (wide)
double double
long double
long double
* The bool type became available at the D45 release with native C++ using the
VERSION2 directive.
Table 2-4. Predefined Data Types (page 2 of 2)
Long forms Abbreviated forms