Predefined Operators
Tip
This section is a bird view of basic opertors for a statically compiled version of U. Operators are totally customizable.
Prefix operators:¶
Operator | Description |
---|---|
++ |
Pre-Increment: same as V += 1; before use; |
-- |
Pre-Decrement: same as V += 1; before use; |
+ |
return value unchanged |
- |
Negation operator: -V |
! |
Logical NOT |
~ |
Binary complement |
Postfix operators:¶
Operator | Description |
---|---|
++ |
Post-Increment: same as V += 1; after use; |
-- |
Post-Decrement: same as V += 1; after use; |
Infix operators:¶
Precedence | Operator | Description |
---|---|---|
13 | ** |
Exponentiation |
12 | * *^ / % |
Multiplication Overflow multiplication Division Modulo or remainder |
11 | + - +^ -^ |
Addition Substraction Overflow addition Overflow substraction |
10 | << >> ^<< >>^ >>> @<< >>@ |
Left shift Right shift Overflow left shift Overflow right shift Unsigned right shift: Zero bits are shifted in from the left Rotational left shift: leftmost bit becomes rightmost bit Rotational right shift: rightmost bit becomes leftmost bit |
9 | ^ | & |
Binary XOR Binary OR Binary AND |
8 | === == != <> < > <= >= ~= |
Referencial equality Structural equality Inequality 3-Way comparison Less than Greater than Less than, or equal to Greater than, or equal to Regexp matching |
7 | && || |
Logical AND Logical OR |
6 | ? |
Coalescing |
5 | :? |
Ternary Conditional Expression |
4 | ++ |
Concat two collections |
3 | : |
Bind values |
2 | := += -= +^= -^= *= *^= /= %= **= //= &= ^= |= <<= >>= ^<<= >>^= >>>= @<<= >>@= ?= |
Update a mutable value Addition and '=' Substraction and '=' Overflow addition and '=' Overflow substraction and '=' Multiplication and '=' Overflow multiplication and '=' Division and '=' Modulo or remainder and '=' Exponentiation and '=' Division floor and '=' Binary AND and '=' Binary XOR and '=' Binary OR and '=' Left shift and '=' Right shift and '=' Overflow left shift and '=' Overflow right shift and '=' Unsigned right shift: Zero bits are shifted in from the left and '=' Rotational left shift: leftmost bit becomes rightmost bit and '=' Rotational right shift: rightmost bit becomes leftmost bit and '=' Coalescing and '=' |
1 | |> |
Chain calls from left to right |