Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbMoneyDiv

Divide one money value by another money value. pResult = left / right.

Declaration

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

Description

ctdbMoneyDiv() divide one money value by another money value. pResult = left / right. Do not make regular division with CTMONEY values. You may user regular division between a CTMONEY value and a numeric value (int, COUNT, FLOAT, etc.).

  • left [in] the value to be divided (divisor).
  • right [in] the value to divide (dividend).
  • pResult [out] the result of the Div operation.

Returns

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

The possible errors associated with ctdbMoneyDiv() are:

  • CTDBRET_NULARG (4007): Null argument not valid in any operand
  • CTDBRET_DIVBYZERO (4040): Division by zero error

See also

ctdbMoneyAdd(), ctdbMoneySub(), ctdbMoneyMul()

TOCIndex