Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbCurrencyToMoney

Convert a CTCURRENCY value to a CTMONEY value.

Declaration

CTDBRET ctdbCurrencyMoney(CTCURRENCY currency, pCTMONEY pMoney)

Description

ctdbCurrencyToMoney() converts a CTCURRENCY value to a CTMONEY value. A currency value is an 8 bytes integer. Use ctdbMoneyToCurrency() to convert from a CTMONEY value to a CTCURRENCY value.

  • currency [in] the CTCURRENCY value (8 bytes integer).
  • pMoney [out] the CTMONEY value.

Returns

ctdbCurrencyToMoney() returns CTDBRET_OK on success, or c-treeDB API error on failure.

The possible error associated with ctdbCurrencyToMoney() is:

  • CTDBRET_NULARG (4007): Null argument not valid in pMoney
  • CTDBRET_OVERFLOW (4038): Operation caused overflow
  • CTDVRET_UNDERFLOW (4039): Operation caused underflow

See also

ctdbMoneyToCurrency()

TOCIndex