Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbMoneyAdd

Add two money values. pResult = left + right

Declaration

CTDBRET ctdbMoneyAdd(CTMONEY left, CTMONEY right, pCTMONEY pResult)

Description

ctdbMoneyAdd() add two money values. pResult = left + right. Do not make regular additions with CTMONEY 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

ctdbMoneyAdd() returns CTDBRET_OK on success, or FairCom DB API error on failure.

The possible errors associated with ctdbMoneyAdd() 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

ctdbMoneySub(), ctdbMoneyMul(), ctdbMoneyDiv()

TOCIndex