The rules governing the use of operators and parentheses remain the same, and left-sided binding is in effect.
Priority | Operator | Name | Example | Result | Result type |
---|---|---|---|---|---|
Highest | * |
Replication |
|
'aaa' |
Always a string |
Middle | + |
Concatenation |
|
|
Always a string |
Boolean operators demand Boolean arguments, and always result in a Boolean result. The rules governing the use of operators and parentheses remain the same, including left-sided binding.
Priority | Operator | Name | Example | Result |
---|---|---|---|---|
Highest | not |
negation | not false |
True |
not True |
False |
|||
Middle | and |
conjunction | False and False |
False |
False and True |
False |
|||
True and False |
False |
|||
True and True |
True |
|||
Lowest | or |
disjunction | False or False |
False |
False or True |
True |
|||
True or False |
True |
|||
True or True |
True |
Relational operators compare their arguments to diagnose the relationship between them, and always return a Boolean value indicating the comparison result.
Operator | Name | Example | Result |
---|---|---|---|
== |
equal to | 2 == 1 |
False |
!= |
not equal to | 2 != 1 |
True |
> |
greater than | 2 > 1 |
True |
>= |
greater or equal |
|
|
< |
less than | 2 < 1 |
False |
<= |
less or equal |
|
|