Unary Operators

The +, - and Not operators are named unary operators because they have a single operand.

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, UInteger, 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 Not

The Logical Not 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:

Fore.NET Language Guide | Arithmetic Operators | Logical Operators