company logo

Value :: operator+ - Add two values

The operation provides the result of adding two values. The operation is an ordinary binary operation returning the result in the data format of the left operand (calling object). The operation behaves differently for different data types of the left operand:

  1. Numbers (INT, REAL)
  2. The operation builds the sum for the participating operands and returns the result with the data type of the first operand.

  3. Text (STRING, CHAR, CCHAR)
  4. The second operand is converted into text and appended to the text of the first operand.

  5. Boolean (LOGICAL)
  6. The second operand is converted into a Boolean value and the result is true, when one of the operands is true (or).

  7. Date
  8. The second operator is converted into an integer number and added as number of days to the date value in the first operand.

  9. Time
  10. The second operator is converted into an integer number and added as number of hundredth seconds to the date value in the first operand.

  11. DateTime
  12. The second operator is converted into an integer number and added as number of hundredth seconds to the timestamp value in the first operand.

  13. Other

For all other data types for the left hand operand, the function throws an exception.

Return value:  Value handle ( odaba::Value  )

A value handle refers to a (usually) opened value. Invalid value handles may cause an exception.

Implementation details

odaba::Value Value  :: operator+ ( odaba::Value &cValue )
  • cValue - Value handle

    A value handle refers to a (usually) opened value. Invalid value handles may cause an exception.