Clarify some docs on operator precedence

This commit is contained in:
Nigel Tao committed 2017-11-18 13:53:12 +11:00
1 parent b322dc5334
commit c910b5bca8
1 file changed
+3 -3
+3 -3
View File
@@ -60,8 +60,8 @@ u16, etc.
## Operators ## Operators
All binary operators have equal precedence. `a * b + c` is an invalid There is no operator precedence. `a * b + c` is an invalid expression. You must
expression. You must explicitly write either `(a * b) + c` or `a * (b + c)`. explicitly write either `(a * b) + c` or `a * (b + c)`.
Some binary operators (`+`, `*`, `&`, `|`, `^`, `and`, `or`) are also Some binary operators (`+`, `*`, `&`, `|`, `^`, `and`, `or`) are also
associative: `(a + b) + c` and `a + (b + c)` are equivalent, and can be written associative: `(a + b) + c` and `a + (b + c)` are equivalent, and can be written
@@ -292,4 +292,4 @@ buffers of bytes, such as an I/O stream or a table of pixel data.
--- ---
Updated on August 2017. Updated on November 2017.