Order of Precedence: Difference between revisions
Category: Scripting Topics
m (table formatting and onlyInclude tag) |
m (moved onlyInclude) |
||
| Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
<onlyinclude> | |||
Order of operations, also called operator precedence, is a set of rules specifying which procedures should be performed first in a mathematical expression. | Order of operations, also called operator precedence, is a set of rules specifying which procedures should be performed first in a mathematical expression. | ||
== Precedence Overview == | == Precedence Overview == | ||
{{Feature | Informative | | {{Feature | Informative | | ||
* Highest precedence means highest priority | * Highest precedence means highest priority | ||
Revision as of 17:53, 10 February 2021
Introduction
Order of operations, also called operator precedence, is a set of rules specifying which procedures should be performed first in a mathematical expression.
Precedence Overview
| Precedence | Type of Operator | Examples |
|---|---|---|
| 11 |
Nular operators (commands with no arguments):
|
|
| 10 |
Unary operators (commands with 1 argument):
|
|
| 9 | Hash-select operator | |
| 8 | Power operator | |
| 7 | ||
| 6 | ||
| 5 | N/A | |
| 4 |
Binary operators (commands with 2 arguments):
|
|
| 3 | ||
| 2 | Logical and operator | |
| 1 | Logical or operator |