Freya supports unary operators for the numeric plus and minus, logical negation and bitwise complement.
These are the unary operators in Freya:
Operator | Meaning |
---|---|
+ | Numeric plus. |
- | Numeric negation. |
not | Logical 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# | Freya | Special method name |
---|---|---|
! | not | op_LogicalNot |
~ | ~ | op_OnesComplement |
Shift and bitwise binary operators
Expressions
Class declarations
Interface declarations