Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbNumberDiv

Divide one Number value by another Number value. pResult = pLeft / pRight.

Declaration

CTDBRET ctdbNumberDiv(pCTNUMBER pLeft, pCTNUMBER pRight,

pCTNUMBER pResult)

Description

ctdbNumberDiv() divide one Number value by another Number value. pResult = pLeft / pRight. Do not make regular division with CTNUMBER values.

  • pLeft [in] the value to be divided by pRight (divisor).
  • pRight [in] the value to divide into pLeft (dividend).
  • pResult [out] the result of the Div operation.

Returns

ctdbNumberDiv() returns CTDBRET_OK on success, or FairCom DB API error on failure.

The possible errors associated with ctdbNumberDiv() are:

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

See also

ctdbNumberAdd(), ctdbNumberSub(), ctdbNumberMul()

TOCIndex