Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbNumberSub

Subtract two Number values. pResult = pLeft - pRight.

Declaration

CTDBRET ctdbNumberSub(pCTNUMBER pLeft, pCTNUMBER pRight, pCTNUMBER pResult)

Description

ctdbNumberSub() subtracts two Number values. pResult = pLeft - pRight. Do not make regular subtractions with CTNUMBER values.

  • pLeft [in] the first value, from which the pRight value will be subtracted.
  • pRight [in] the second value, which is the value to subtract from pLeft.
  • pResult [out] the result of the subtraction operation.

Returns

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

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

ctdbNumberAdd(), ctdbNumberMul(), ctdbNumberDiv()

TOCIndex