Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>bcd binary coded decimal type</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 bcd                     Binary Coded Decimal Type

    Turbo C++ includes two new data classes -- complex and bcd. The bcd
    class is for binary coded decimal numbers (numbers stored internally
    as decimal -- one decimal digit per four bits -- usually to avoid
    roundoff error). This declares a bcd number called my_bcd with a
    value of 10.59:

                bcd my_bcd(10.59);

    The complex type is for complex numbers (numbers with a real and
    imaginary part, the imaginary part being some multiple of the square
    root of -1). This declares a complex number called my_complex with
    real part 10.59 and imaginary part 5.33:

                complex my_complex(10.59, 5.33);

   -------------------------------- Example ---------------------------------

                bcd this_number_is_bcd(51.7);


See Also: complex

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson