Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ When several operations occur in an expression, each part is evaluated and resol

When expressions contain operators from more than one category, they are evaluated according to the following rules:

- The arithmetic and concatenation operators have the order of precedence described in the following section, and all have greater precedence than the comparison, logical, and bitwise operators.
- The arithmetic and concatenation operators have the order of precedence described in the following section, and all have greater precedence than the comparison, logical, and bitwise operators. Higher precedence means these operators are evaluated first.

- All comparison operators have equal precedence, and all have greater precedence than the logical and bitwise operators, but lower precedence than the arithmetic and concatenation operators.

Expand All @@ -34,13 +34,13 @@ When several operations occur in an expression, each part is evaluated and resol

## Precedence Order

Operators are evaluated in the following order of precedence:
Operators are evaluated in the following order of precedence. Operators listed first have higher precedence and are evaluated before operators listed later:

### Await Operator
### 1. Await Operator

Await

### Arithmetic and Concatenation Operators
### 2. Arithmetic and Concatenation Operators

Exponentiation (`^`)

Expand All @@ -58,11 +58,11 @@ When several operations occur in an expression, each part is evaluated and resol

Arithmetic bit shift (`<<`, `>>`)

### Comparison Operators
### 3. Comparison Operators

All comparison operators (`=`, `<>`, `<`, `<=`, `>`, `>=`, `Is`, `IsNot`, `Like`, `TypeOf`...`Is`)

### Logical and Bitwise Operators
### 4. Logical and Bitwise Operators

Negation (`Not`)

Expand Down Expand Up @@ -108,7 +108,9 @@ e = 1.0
f = a - b + c / d * e
' The preceding line sets f to 7.0. Because of natural operator
' precedence and associativity, it is exactly equivalent to the
' following line.
' following line. Division and multiplication (/, *) have higher
' precedence than addition and subtraction (+, -), so c / d * e
' is evaluated first, then the addition and subtraction from left to right.
f = (a - b) + ((c / d) * e)
' The following line overrides the natural operator precedence
' and left associativity.
Expand Down