ILE C/C++ Programmer's Guide

The packed decimal data type representation includes integral and
fractional parts. For ILE C++, the largest packed decimal
representation is 31 digits.
The ILE C++ compiler supports the packed decimal data type in the
bcd class. The header file is
<bcd.h>.
- Note:
- The ILE C compiler supports the packed decimal data type as an extension to
ISO C. For more information, refer to Chapter 26, Using Packed Decimal Data in a C Program.
You can use the packed decimal data type to:
- Represent large numeric quantities accurately, especially in business and
commercial applications for financial calculations.
- Note:
- You do not have to use floating point arithmetic. Floating
point is more suitable for scientific and engineering computations, which
often use numbers that:
- Are much larger than the largest packed decimal variable can store
- Are much smaller than the smallest packed decimal, but do not have enough
precision for commercial use
- Declare type definitions, arrays, structures, and unions that have packed
decimal members. You can apply unary operators on packed decimal
variables. Bitwise operators do not apply to packed decimal
data. For more information on the packed decimal data type, see WebSphere Development Studio: ILE C/C++ Language
Reference.
This chapter describes:
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.