Binary Operators | ||
Symbol | Example | Explanation |
** |
a**b |
exponentiation |
* |
a*b |
multiplication |
/ |
a/b |
division |
% |
a%b |
* modulo |
+ |
a+b |
addition |
- |
a-b |
subtraction |
== |
a==b |
equality |
!= |
a!=b |
inequality |
< |
a<b |
less than |
<= |
a<=b |
less than or equal to |
> |
a>b |
greater than |
>= |
a>=b |
greater than or equal to |
& |
a&b |
* bitwise AND |
^ |
a^b |
* bitwise exclusive OR |
| |
a|b |
* bitwise inclusive OR |
&& |
a&&b |
* logical AND |
|| |
a||b |
* logical OR |
= |
a = b |
assignment |
, |
(a,b) |
serial evaluation |
. |
A.B |
string concatenation |
eq |
A eq B |
string equality |
ne |
A ne B |
string inequality |
Logical AND (&&) and OR (3#33#3) short-circuit the way they do in C. That is, the second && operand is not evaluated if the first is false; the second 3#33#3 operand is not evaluated if the first is true.
Serial evaluation occurs only in parentheses and is guaranteed to proceed in left to right order. The value of the rightmost subexpression is returned.