Operators



The following table summarizes all 11l operators in order of precedence from highest to lowest:
x.y
module:f
a[x]
f(x)
x--
x++
Member access
Module function or variable access
Subscript
Function call
Postfix decrement
Postfix increment
^Power operator (right to left associative)
-x
+x
!x
(-)x
--x
++x
&x
Unary minus
Unary plus
Logical NOT
Bitwise NOT (rationale: {})
Prefix decrement
Prefix increment
Address-of
x * y
x / y
x I/ y
x % y
Multiplication
Division
Integer division {}
Remainder
x + y
x - y
Addition
Subtraction
x << y
x >> y
Bitwise left shift
Bitwise right shift
x [&] yBitwise AND (rationale: {})
x (+) yBitwise XOR (rationale: {})
x [|] yBitwise OR (rationale: {})
x < y, x <= y
x > y, x >= y
Comparison operators
x..y, x.<y
x<.y, x<.<y
Ranges
x""y and x‘’yString concatenation (rationale)
x == y, x != y
e in c, e !in c
e C c, e !C c
Comparisons
Including membership tests
x & yLogical AND (rationale: {})
x | yLogical OR
x ? yNull coalescing
() -> expr
x -> expr
(x, y) -> expr
Lambda expression
arr1 [+] arr2Array concatenation (rationale: {})
x = ...
x += ...
-= *= /= I/=
%= >>= <<= ^=
[+]= [&]= [|]=
(+)= ‘’=
Assignments (right to left associative)