You can use the OMBCD library to create and manipulate BCD (Binary Coded Decimal) numbers in your programs.
BCD numbers are useful for financial calculations.
The syntax of most BCD functions is the same as that for the corresponding floating point
functions, and you can safely import both of them—
single OmniMark program.
There are several categories of external functions in the OMBCD library, all of which use the same operators as in the OMFLOAT library and in core OmniMark:
You can do output of all BCD numbers by using the OmniMark template formatting language or
by using the format operator (
To use OMBCD, you must import it into your program using an import declaration such as:
import "ombcd.xmd" unprefixed
This is a complete list of the OMBCD library external exceptions that may be thrown back to the calling
OmniMark program. These are all catchable using the
String is Not a Valid BCD Value
Format Command Not Supported
Format Modifier Not Supported
Illegal Template Character
Illegal Format String
Divide By Zero
Zero Raised to the Power Zero
Illegal Rounding Base
Out Of Memory