Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbNumberAdd

Add two Number values. pResult = left + right

Declaration

CTDBRET ctdbNumberAdd(pCTNUMBER pLeft, pCTNUMBER pRight,

pCTNUMBER pResult)

Description

ctdbNumberAdd() add number pLeft to pRight and store the result in ‘pResult’. Do not make regular additions with CTNUMBER values.

  • pLeft [in] pointer to the first value to be added.
  • pRight [in] pointer to the second value to be added.
  • pResult [out] pointer to the result of the add operation.

Returns

ctdbNumberAdd() returns CTDBRET_OK on success, or c-treeDB API error on failure. The possible error associated with ctdbNumberAdd() is:

  • CTDBRET_OVERFLOW (4038): Operation caused overflow

See also

ctdbNumberSub(), ctdbNumberMul(), ctdbNumberDiv()

TOCIndex