The decimal macros
The decimal.h header file also includes
the following macros that might be useful in a DataBlade®
API module.
Decimal macro | Description |
---|---|
DECLEN(p, s) | Calculates the minimum number of bytes required to hold the DECIMAL(p,s) value |
DECPREC(size) | Calculates a default precision given the number of bytes (size) used to store the number |
PRECTOT(dec) | Returns the total precision of the dec value |
PRECDEC(dec) | Returns the scale of the dec value |
PRECMAKE(p, s) | Creates a precision value from the specified
total precision (p) and scale (s) For a complete list of decimal macros, consult the decimal.h header file that is installed with your database server. This header file is in the incl/public subdirectory of the INFORMIXDIR directory. |