Assigning an IBinaryCodedDecimal to an Integer

To convert an IBinaryCodedDecimal object with a fractional part to an integer type:

int op;
IBinaryCodedDecimal op1("12345.67");
op = op1;
                    // Truncation on the fractional
                    // part. op=12345

To convert an IBinaryCodedDecimal object with less than 10 digits in the integral part to an integer type:

int op;
IBinaryCodedDecimal op2("123");
op = op2;       // No truncation; op=123

To convert an IBinaryCodedDecimal object with more than 10 digits in the integral part to an integer type:

int op2;
IBinaryCodedDecimal op3("123456789012");
op2 = op3;
                      // Truncation occurs on the integral
                      // part. op2=3456789012; Exception thrown.


Representing Numerical Quantities Using IBinaryCodedDecimal
Performing Calculations Using IBinaryCodedDecimal
Assigning One IBinaryCodedDecimal to Another
Assigning an IBinaryCodedDecimal to a Float


What Is a Binary Coded Decimal