ILE C/C++ Programmer's Guide

Declaring _DecimalT Class Template Objects

To declare an object as a _DecimalT class template:


_DecimalT<10,2> x;

_DecimalT<5,0> z;
_DecimalT<18,10> *ptr.;
_DecimalT<8,2> arr[100];

Notes:

  1. The variable x can have values from __D("-99999999.99") to __D("+99999999.99")

  2. The variable z can have values from __D("-99999") to __D("+99999")

  3. ptr is a pointer to an object of type _DecimalT<18,10>

  4. arr is an array of 100 elements, where each element is of class _DecimalT<8,2>

  5. The string must contain only the following characters:
    0 1 2 3 4 5 6 7 8 9 . -- +
    


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