The Freya Programming Language

Unary operators

See also

Freya supports unary operators for the numeric plus and minus, logical negation and bitwise complement.

Syntax

These are the unary operators in Freya:

OperatorMeaning
+Numeric plus.
-Numeric negation.
notLogical negation.
~Bitwise complement.

Though most modern Pascal implementations, including Delphi, use the same operator (not) both for the logical negation and the bitwise complement, Freya defines two different operators for these tasks, in order to support all of the user defined operators allowed by the Common Language Runtime:

C#FreyaSpecial method name
!notop_LogicalNot
~~op_OnesComplement

See also

Shift and bitwise binary operators
Expressions
Class declarations
Interface declarations