ILE C/C++ Programmer's Guide


The OS/400 Binary Coded Decimal (BCD) Header File

The class and function template definitions for the C++ _DecimalT class template and the numerical limits of a _DecimalT class template are defined inside the header file <bcd.h>. See Table 27.

Any C++ source file that uses the _DecimalT class template must include the bcd.h header file. The #include <bcd.h> statement must appear before any use of the _DecimalT class template.


Table 27. Constants Defined in bcd.h

Constant Name Description
DEC_DIG The maximum number of significant digits that the _DecimalT class template can hold.
DEC_PRECISION The maximum number of decimal places that the _DecimalT class template can hold.
DEC_INT_DIG The number of significant digits of a binary coded decimal object when you convert it to an integer type. The value 10 is stored in DEC_INT_DIG.
DEC_INT_PREC The number of decimal places of a binary coded decimal object when you convert it from an integer type. The value 0 is stored in DEC_INT_PREC.


[ Top of Page | Previous Page | Next Page | Table of Contents ]