Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbCurrencyMul

Multiply two CTCURRENCY values.

Declaration

CTDBRET ctdbCurrencyMul(CTCURRENCY left, CTCURRENCY right,

pCTCURRENCY pResult)

Description

ctdbCurrencyMul() multiplies two currency values. pResult = left * right. Do not use regular multiplication with CTCURRENCY values. Use regular multiplication with a combination of a CTCURRENCY 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.

Returns

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

The possible errors associated with ctdbCurrencyMul() are:

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

See also

ctdbCurrencyAdd(), ctdbCurrencySub(), ctdbCurrencyDiv()

TOCIndex