Skip to content

Commit 5dadbfb

Browse files
Add -and/-or/-xor equal precedence note
1 parent 0f79c66 commit 5dadbfb

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

reference/5.1/Microsoft.PowerShell.Core/About/about_Logical_Operators.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ If the left operand in a statement that contains the `-or` statement is TRUE,
2727
the right operand isn't evaluated. As a result, you can use these statements in
2828
the same way that you would use the `if` statement.
2929

30+
> [!IMPORTANT]
31+
> The `-and`, `-or` and `-xor` operators have equal precedence. They are
32+
> evaluated from left to right as they appear within the expression. For more
33+
> information, see [about_Operator_Precedence][01].
34+
3035
## Syntax
3136

3237
The syntax of the logical operators is as follows:

reference/7.4/Microsoft.PowerShell.Core/About/about_Logical_Operators.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ If the left operand in a statement that contains the `-or` statement is TRUE,
2727
the right operand isn't evaluated. As a result, you can use these statements in
2828
the same way that you would use the `if` statement.
2929

30+
> [!IMPORTANT]
31+
> The `-and`, `-or` and `-xor` operators have equal precedence. They are
32+
> evaluated from left to right as they appear within the expression. For more
33+
> information, see [about_Operator_Precedence][01].
34+
3035
## Syntax
3136

3237
The syntax of the logical operators is as follows:

reference/7.5/Microsoft.PowerShell.Core/About/about_Logical_Operators.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ If the left operand in a statement that contains the `-or` statement is TRUE,
2727
the right operand isn't evaluated. As a result, you can use these statements in
2828
the same way that you would use the `if` statement.
2929

30+
> [!IMPORTANT]
31+
> The `-and`, `-or` and `-xor` operators have equal precedence. They are
32+
> evaluated from left to right as they appear within the expression. For more
33+
> information, see [about_Operator_Precedence][01].
34+
3035
## Syntax
3136

3237
The syntax of the logical operators is as follows:

reference/7.6/Microsoft.PowerShell.Core/About/about_Logical_Operators.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ If the left operand in a statement that contains the `-or` statement is TRUE,
2727
the right operand isn't evaluated. As a result, you can use these statements in
2828
the same way that you would use the `if` statement.
2929

30+
> [!IMPORTANT]
31+
> The `-and`, `-or` and `-xor` operators have equal precedence. They are
32+
> evaluated from left to right as they appear within the expression. For more
33+
> information, see [about_Operator_Precedence][01].
34+
3035
## Syntax
3136

3237
The syntax of the logical operators is as follows:

0 commit comments

Comments
 (0)