Operator Precedence
Table 5, Operator precedence shows all the Erlang operators in order of descending priority together with their associativity. Operator precedence and associativity are used to determine the evaluation order in unparenthesized expressions.
Operators | Associativity |
| |
| |
(unary) | |
| Left associative |
| Left associative |
| Right associative |
| |
| |
| |
| Right associative |
|
Expressions with higher priority (higher up in the table) are
evaluated first, and then expressions with lower priority are evaluated. So, for
example, to evaluate 3+4*5+6, we first evaluate the
subexpression 4*5, since ( ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access