Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbMoneySub

Subtract two money values. pResult = left - right.

Declaration

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

Description

ctdbMoneySub() subtracts two money values. pResult = left - right. Do not make regular subtractions with CTMONEY values.

  • left [in] the first value, to be subtracted by right.
  • right [in] the second value, to subtract from left.
  • pResult [out] the result of the subtraction operation.

Returns

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

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

ctdbMoneyAdd(), ctdbMoneyMul(), ctdbMoneyDiv()

TOCIndex