Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbNumberNegate

Negate a number.

Declaration

CTDBRET ctdbNumberNegate(pCTNUMBER pSource, pCTNUMBER pResult)

Description

ctdbNumberNegate negates a number (eg. -Number).

  • pSource [in] the value to be negated.
  • pResult [out] the negated value (= -pSource).

Returns

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

The possible errors associated with ctdbNumberNegate() are:

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

See also

ctdbNumberAdd(), ctdbNumberSub(), ctdbNumberMul(), ctdbNumberDiv(), ctdbNumberAbs(), ctdbNumberCmp(), ctdbNumberZero(), ctdbNumberRound(), ctdbNumberCopy(), ctdbNumberGetDecimal()

TOCIndex