Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbCurrencyAdd

Add two currency values. pResult = left + right

Declaration

CTDBRET ctdbCurrencyAdd(CTCURRENCY left, CTCURRENCY right, pCTCURRENCY pResult)

Description

ctdbCurrencyAdd() adds two currency values. pResult = left + right. Do not make regular additions with CTCURRENCY values.

  • left [in] the first value to be added.
  • right [in] the second value to be added.
  • pResult [out] the result of the add operation.

Returns

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

The possible errors associated with ctdbCurrencyAdd() are:

  • CTDBRET_NULARG (4007): Null argument not valid in any operand
  • CTDBRET_UNDERFLOW (4039): Operation caused underflow
  • CTDBRET_OVERFLOW (4038): Operation caused overflow

See also

ctdbCurrencySub(), ctdbCurrencyMul(), ctdbCurrencyDiv()

TOCIndex