[xsd-users] XSD_CXX_TREE_DECIMAL_FIXED functionality.
Boris Kolpackov
boris at codesynthesis.com
Mon Mar 18 08:59:29 EDT 2019
jimson.james at intellitix.com <jimson.james at intellitix.com> writes:
> Any simple way to ensure the 'decimal' presion is kept even when the decimal
> is 0.00?
>
> [...]
>
> Is it fair to fix it like this, or do I really need to use the customized
> type functionality?
Using type customization is the clean way to do it (see the
cxx/tree/custom/double example which does pretty much this but
for the xs:double type).
Alternatively, if you always want two fractional digits, then you
can compile with the XSD_CXX_TREE_DECIMAL_PRECISION macro defines
to 2.
More information about the xsd-users
mailing list