Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic


Multiply two CTMONEY values.


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


ctdbMoneyMul() multiplies two money values. pResult = left * right. Do not make regular multiplication with CTMONEY values. It is possible to use regular multiplication with a CTMONEY value and a numeric value (int, COUNT, FLOAT, etc.).

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


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

The possible errors associated with ctdbMoneyMul() are:

  • CTDBRET_NULARG (4070): Null argument not valid in any operand
  • CTDBRET_OVERFLOW (4038): Operation caused overflow

See also

ctdbMoneyAdd(), ctdbMoneySub(), ctdbMoneyDiv()