Unary Operators

The +, - and NOT operators are named unary operators as they have a single operand.

unary-expression:

primary-expression

+   primary-expression

-   primary-expression

Not   primary-expression

Unary Plus

For the Unary Plus operator of the +X form, a types extension is applied to select the specific standard implementation. Standard implementation is determined for the following operand types: Integer, UInte-ger, Long, ULong, Float, Double, Decimal. The result of this operator is simply the value of the operand.

Unary Minus

For the Unary Minus operator of the -X form, a types extension is applied to select the specified standard implementation. The following standard implementations are determined:

Logical Negation

The Logical Negation operator of the Not X form is determined for Boolean-type operands. If the operand value is True, the operator result is False, and vice versa if the operand value is False, the result value is True.

See also:

Expressions