Skip to content

Commit e691f23

Browse files
Minor formatting/verbiage changes
1 parent 67c98eb commit e691f23

4 files changed

Lines changed: 46 additions & 46 deletions

File tree

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ evaluated. Operators on the same line, or in the same group, have equal
3333
precedence.
3434

3535
The Operator column lists the operators. The Reference column lists the
36-
PowerShell Help topic in which the operator is described. To display the topic,
37-
type `Get-Help <topic-name>`.
36+
PowerShell Help topic in which the operator is described. To display the topic
37+
interactively, use `Get-Help -Name <topic-name>`.
3838

3939
| OPERATOR | REFERENCE |
4040
| --------------------------- | ------------------------------------ |
@@ -91,7 +91,7 @@ that happens.
9191

9292
## Examples
9393

94-
The following two commands show the arithmetic operators and the effect of
94+
The following two examples show the arithmetic operators and the effect of
9595
using parentheses to force PowerShell to evaluate the enclosed part of the
9696
expression first.
9797

@@ -104,28 +104,28 @@ PS> (2 + 3) * 4
104104
```
105105

106106
The following example gets the read-only text files from the local directory
107-
and saves them in the `$read_only` variable.
107+
and saves them in the `$readOnly` variable.
108108

109109
```powershell
110-
$read_only = Get-ChildItem *.txt | Where-Object {$_.IsReadOnly}
110+
$readOnly = Get-ChildItem -Path *.txt | Where-Object { $_.IsReadOnly }
111111
```
112112

113113
It is equivalent to the following example.
114114

115115
```powershell
116-
$read_only = ( Get-ChildItem *.txt | Where-Object {$_.IsReadOnly} )
116+
$readOnly = (Get-ChildItem -Path *.txt | Where-Object { $_.IsReadOnly })
117117
```
118118

119119
Because the pipeline operator (`|`) has a higher precedence than the assignment
120120
operator (`=`), the files that the `Get-ChildItem` cmdlet gets are sent to the
121121
`Where-Object` cmdlet for filtering before they are assigned to the
122-
`$read_only` variable.
122+
`$readOnly` variable.
123123

124124
The following example demonstrates that the index operator takes precedence
125125
over the cast operator.
126126

127127
This expression creates an array of three strings. Then, it uses the index
128-
operator with a value of 0 to select the first object in the array, which is
128+
operator with a value of `0` to select the first object in the array, which is
129129
the first string. Finally, it casts the selected object as a string. In this
130130
case, the cast has no effect.
131131

@@ -160,7 +160,7 @@ PS> (2 -gt 4) -and 1
160160
False
161161
```
162162

163-
If the -and operator had higher precedence, the answer would be TRUE.
163+
If the `-and` operator had higher precedence, the result would be TRUE.
164164

165165
```powershell
166166
PS> 2 -gt (4 -and 1)
@@ -207,7 +207,7 @@ the expression is FALSE.
207207
- [about_Split][split]
208208
- [about_Type_Operators][type]
209209

210-
<!-- reference links -->
210+
<!-- link references -->
211211
[math]: about_Arithmetic_Operators.md
212212
[assign]: about_Assignment_Operators.md
213213
[compare]: about_Comparison_Operators.md

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ evaluated. Operators on the same line, or in the same group, have equal
3333
precedence.
3434

3535
The Operator column lists the operators. The Reference column lists the
36-
PowerShell Help topic in which the operator is described. To display the topic,
37-
type `Get-Help <topic-name>`.
36+
PowerShell Help topic in which the operator is described. To display the topic
37+
interactively, use `Get-Help -Name <topic-name>`.
3838

3939
| OPERATOR | REFERENCE |
4040
| --------------------------- | ------------------------------------ |
@@ -85,16 +85,16 @@ that happens.
8585
| ------------------------------------------------------- | ------------------------------------ |
8686
| `.` (dot-source) | [about_Operators][ops] |
8787
| `&` (call) | [about_Operators][ops] |
88-
| `? <if-true> : <if-false>` (Ternary operator) | [about_Operators][ops] |
89-
| `??` (null-coalese operator) | [about_Operators][ops] |
88+
| `? <if-true> : <if-false>` (ternary operator) | [about_Operators][ops] |
89+
| `??` (null-coalescing operator) | [about_Operators][ops] |
9090
| <code>&#124;</code> (pipeline operator) | [about_Operators][ops] |
9191
| `> >> 2> 2>> 2>&1` | [about_Redirection][redir] |
9292
| <code>&& &#124;&#124;</code> (pipeline chain operators) | [about_Operators][ops] |
9393
| `= += -= *= /= %= ??=` | [about_Assignment_Operators][assign] |
9494

9595
## Examples
9696

97-
The following two commands show the arithmetic operators and the effect of
97+
The following two examples show the arithmetic operators and the effect of
9898
using parentheses to force PowerShell to evaluate the enclosed part of the
9999
expression first.
100100

@@ -107,28 +107,28 @@ PS> (2 + 3) * 4
107107
```
108108

109109
The following example gets the read-only text files from the local directory
110-
and saves them in the `$read_only` variable.
110+
and saves them in the `$readOnly` variable.
111111

112112
```powershell
113-
$read_only = Get-ChildItem *.txt | Where-Object {$_.IsReadOnly}
113+
$readOnly = Get-ChildItem -Path *.txt | Where-Object { $_.IsReadOnly }
114114
```
115115

116116
It is equivalent to the following example.
117117

118118
```powershell
119-
$read_only = ( Get-ChildItem *.txt | Where-Object {$_.IsReadOnly} )
119+
$readOnly = (Get-ChildItem -Path *.txt | Where-Object { $_.IsReadOnly })
120120
```
121121

122122
Because the pipeline operator (`|`) has a higher precedence than the assignment
123123
operator (`=`), the files that the `Get-ChildItem` cmdlet gets are sent to the
124124
`Where-Object` cmdlet for filtering before they are assigned to the
125-
`$read_only` variable.
125+
`$readOnly` variable.
126126

127127
The following example demonstrates that the index operator takes precedence
128128
over the cast operator.
129129

130130
This expression creates an array of three strings. Then, it uses the index
131-
operator with a value of 0 to select the first object in the array, which is
131+
operator with a value of `0` to select the first object in the array, which is
132132
the first string. Finally, it casts the selected object as a string. In this
133133
case, the cast has no effect.
134134

@@ -163,7 +163,7 @@ PS> (2 -gt 4) -and 1
163163
False
164164
```
165165

166-
If the -and operator had higher precedence, the answer would be TRUE.
166+
If the `-and` operator had higher precedence, the result would be TRUE.
167167

168168
```powershell
169169
PS> 2 -gt (4 -and 1)
@@ -210,7 +210,7 @@ the expression is FALSE.
210210
- [about_Split][split]
211211
- [about_Type_Operators][type]
212212

213-
<!-- reference links -->
213+
<!-- link references -->
214214
[math]: about_Arithmetic_Operators.md
215215
[assign]: about_Assignment_Operators.md
216216
[compare]: about_Comparison_Operators.md

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ evaluated. Operators on the same line, or in the same group, have equal
3333
precedence.
3434

3535
The Operator column lists the operators. The Reference column lists the
36-
PowerShell Help topic in which the operator is described. To display the topic,
37-
type `Get-Help <topic-name>`.
36+
PowerShell Help topic in which the operator is described. To display the topic
37+
interactively, use `Get-Help -Name <topic-name>`.
3838

3939
| OPERATOR | REFERENCE |
4040
| --------------------------- | ------------------------------------ |
@@ -85,16 +85,16 @@ that happens.
8585
| ------------------------------------------------------- | ------------------------------------ |
8686
| `.` (dot-source) | [about_Operators][ops] |
8787
| `&` (call) | [about_Operators][ops] |
88-
| `? <if-true> : <if-false>` (Ternary operator) | [about_Operators][ops] |
89-
| `??` (null-coalese operator) | [about_Operators][ops] |
88+
| `? <if-true> : <if-false>` (ternary operator) | [about_Operators][ops] |
89+
| `??` (null-coalescing operator) | [about_Operators][ops] |
9090
| <code>&#124;</code> (pipeline operator) | [about_Operators][ops] |
9191
| `> >> 2> 2>> 2>&1` | [about_Redirection][redir] |
9292
| <code>&& &#124;&#124;</code> (pipeline chain operators) | [about_Operators][ops] |
9393
| `= += -= *= /= %= ??=` | [about_Assignment_Operators][assign] |
9494

9595
## Examples
9696

97-
The following two commands show the arithmetic operators and the effect of
97+
The following two examples show the arithmetic operators and the effect of
9898
using parentheses to force PowerShell to evaluate the enclosed part of the
9999
expression first.
100100

@@ -107,28 +107,28 @@ PS> (2 + 3) * 4
107107
```
108108

109109
The following example gets the read-only text files from the local directory
110-
and saves them in the `$read_only` variable.
110+
and saves them in the `$readOnly` variable.
111111

112112
```powershell
113-
$read_only = Get-ChildItem *.txt | Where-Object {$_.IsReadOnly}
113+
$readOnly = Get-ChildItem -Path *.txt | Where-Object { $_.IsReadOnly }
114114
```
115115

116116
It is equivalent to the following example.
117117

118118
```powershell
119-
$read_only = ( Get-ChildItem *.txt | Where-Object {$_.IsReadOnly} )
119+
$readOnly = (Get-ChildItem -Path *.txt | Where-Object { $_.IsReadOnly })
120120
```
121121

122122
Because the pipeline operator (`|`) has a higher precedence than the assignment
123123
operator (`=`), the files that the `Get-ChildItem` cmdlet gets are sent to the
124124
`Where-Object` cmdlet for filtering before they are assigned to the
125-
`$read_only` variable.
125+
`$readOnly` variable.
126126

127127
The following example demonstrates that the index operator takes precedence
128128
over the cast operator.
129129

130130
This expression creates an array of three strings. Then, it uses the index
131-
operator with a value of 0 to select the first object in the array, which is
131+
operator with a value of `0` to select the first object in the array, which is
132132
the first string. Finally, it casts the selected object as a string. In this
133133
case, the cast has no effect.
134134

@@ -163,7 +163,7 @@ PS> (2 -gt 4) -and 1
163163
False
164164
```
165165

166-
If the -and operator had higher precedence, the answer would be TRUE.
166+
If the `-and` operator had higher precedence, the result would be TRUE.
167167

168168
```powershell
169169
PS> 2 -gt (4 -and 1)
@@ -210,7 +210,7 @@ the expression is FALSE.
210210
- [about_Split][split]
211211
- [about_Type_Operators][type]
212212

213-
<!-- reference links -->
213+
<!-- link references -->
214214
[math]: about_Arithmetic_Operators.md
215215
[assign]: about_Assignment_Operators.md
216216
[compare]: about_Comparison_Operators.md

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ evaluated. Operators on the same line, or in the same group, have equal
3333
precedence.
3434

3535
The Operator column lists the operators. The Reference column lists the
36-
PowerShell Help topic in which the operator is described. To display the topic,
37-
type `Get-Help <topic-name>`.
36+
PowerShell Help topic in which the operator is described. To display the topic
37+
interactively, use `Get-Help -Name <topic-name>`.
3838

3939
| OPERATOR | REFERENCE |
4040
| --------------------------- | ------------------------------------ |
@@ -85,16 +85,16 @@ that happens.
8585
| ------------------------------------------------------- | ------------------------------------ |
8686
| `.` (dot-source) | [about_Operators][ops] |
8787
| `&` (call) | [about_Operators][ops] |
88-
| `? <if-true> : <if-false>` (Ternary operator) | [about_Operators][ops] |
89-
| `??` (null-coalese operator) | [about_Operators][ops] |
88+
| `? <if-true> : <if-false>` (ternary operator) | [about_Operators][ops] |
89+
| `??` (null-coalescing operator) | [about_Operators][ops] |
9090
| <code>&#124;</code> (pipeline operator) | [about_Operators][ops] |
9191
| `> >> 2> 2>> 2>&1` | [about_Redirection][redir] |
9292
| <code>&& &#124;&#124;</code> (pipeline chain operators) | [about_Operators][ops] |
9393
| `= += -= *= /= %= ??=` | [about_Assignment_Operators][assign] |
9494

9595
## Examples
9696

97-
The following two commands show the arithmetic operators and the effect of
97+
The following two examples show the arithmetic operators and the effect of
9898
using parentheses to force PowerShell to evaluate the enclosed part of the
9999
expression first.
100100

@@ -107,28 +107,28 @@ PS> (2 + 3) * 4
107107
```
108108

109109
The following example gets the read-only text files from the local directory
110-
and saves them in the `$read_only` variable.
110+
and saves them in the `$readOnly` variable.
111111

112112
```powershell
113-
$read_only = Get-ChildItem *.txt | Where-Object {$_.IsReadOnly}
113+
$readOnly = Get-ChildItem -Path *.txt | Where-Object { $_.IsReadOnly }
114114
```
115115

116116
It is equivalent to the following example.
117117

118118
```powershell
119-
$read_only = ( Get-ChildItem *.txt | Where-Object {$_.IsReadOnly} )
119+
$readOnly = (Get-ChildItem -Path *.txt | Where-Object { $_.IsReadOnly })
120120
```
121121

122122
Because the pipeline operator (`|`) has a higher precedence than the assignment
123123
operator (`=`), the files that the `Get-ChildItem` cmdlet gets are sent to the
124124
`Where-Object` cmdlet for filtering before they are assigned to the
125-
`$read_only` variable.
125+
`$readOnly` variable.
126126

127127
The following example demonstrates that the index operator takes precedence
128128
over the cast operator.
129129

130130
This expression creates an array of three strings. Then, it uses the index
131-
operator with a value of 0 to select the first object in the array, which is
131+
operator with a value of `0` to select the first object in the array, which is
132132
the first string. Finally, it casts the selected object as a string. In this
133133
case, the cast has no effect.
134134

@@ -163,7 +163,7 @@ PS> (2 -gt 4) -and 1
163163
False
164164
```
165165

166-
If the -and operator had higher precedence, the answer would be TRUE.
166+
If the `-and` operator had higher precedence, the result would be TRUE.
167167

168168
```powershell
169169
PS> 2 -gt (4 -and 1)
@@ -210,7 +210,7 @@ the expression is FALSE.
210210
- [about_Split][split]
211211
- [about_Type_Operators][type]
212212

213-
<!-- reference links -->
213+
<!-- link references -->
214214
[math]: about_Arithmetic_Operators.md
215215
[assign]: about_Assignment_Operators.md
216216
[compare]: about_Comparison_Operators.md

0 commit comments

Comments
 (0)