Value :: operator- - Minus operator
The operation is provided as binary (subtraction) and unary (negation) operation.
A value handle refers to a (usually) opened value. Invalid value handles may cause an exception.
Implementation overview
- Negate value
Value :: operator- (  ) - Subtract values
Value :: operator- ( cValue )
Implementation details
-
Negate value
odaba::Value Value  :: operator- (  )
The operation provides the negation of a value. The operation is an unary operation returning the result in the data format of the operand (calling object). The operation behaves differently for different data types of operand.
- Numbers ( INT , REAL )
- Boolean ( LOGICAL )
The operation builds the negation of the value (multiplying by -1 ) and returns the result with the data type of the operand.
The operation returns true , when the value is false and false otherwise (not).
For all other data types for the left hand operand, the function throws an exception.
to list
-
Subtract values
odaba::Value Value  :: operator- ( odaba::Value &cValue )
The operation provides the result of subtracting 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.
- Numbers ( INT , REAL )
- Text ( STRING , CHAR , CCHAR )
- Boolean ( LOGICAL )
- Date
- Time
- DateTime
- Other
The operation builds the difference between the participating operands and returns the result with the data type of the first operand.
The second operand is converted into text which is searched and removed from the text in the first operand.
The second operand is converted into a Boolean value and the result is true , when exactly one of the operands is true (exclusive or).
The second operator is converted into an integer number and subtracted as number of days to the date value in the first operand.
The second operator is converted into an integer number and subtracted as number of hundredth seconds to the date value in the first operand.
The second operator is converted into an integer number and subtracted as number of hundredth seconds to the timestamp value in the first operand.
For all other data types for the left hand operand, the function throws an exception.
- cValue
- Value handle
A value handle refers to a (usually) opened value. Invalid value handles may cause an exception.
to list