Skip to content

Commit

Permalink
(GH-10580) Remove extraneous example code
Browse files Browse the repository at this point in the history
Prior to this change, the `about_Automatic_Variables` article included
an unnecessary `Out-Null` in a loop example. Using `Out-Null` in this
case implies that the `Reset()` method returns output, which it
doesn't.

This change:

- Removes the unnecessary `Out-Null` from the example.
- Resolves #10580
- Fixes AB#174090
  • Loading branch information
michaeltlombardi committed Oct 26, 2023
1 parent 71f8f09 commit d82e627
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell.
Locale: en-US
ms.date: 07/17/2023
ms.date: 10/26/2023
no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -955,7 +955,7 @@ foreach ($num in ("one","two", "three"))
if ($num -eq "two" -and $stopLoop -lt 2)
{
$foreach.Reset() | Out-Null
$foreach.Reset()
("`t" * $stopLoop) + "Reset Loop: $stopLoop"
$stopLoop++
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell.
Locale: en-US
ms.date: 07/17/2023
ms.date: 10/26/2023
no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.2&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -995,7 +995,7 @@ foreach ($num in ("one","two", "three"))
if ($num -eq "two" -and $stopLoop -lt 2)
{
$foreach.Reset() | Out-Null
$foreach.Reset()
("`t" * $stopLoop) + "Reset Loop: $stopLoop"
$stopLoop++
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell.
Locale: en-US
ms.date: 07/17/2023
ms.date: 10/26/2023
no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.3&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -995,7 +995,7 @@ foreach ($num in ("one","two", "three"))
if ($num -eq "two" -and $stopLoop -lt 2)
{
$foreach.Reset() | Out-Null
$foreach.Reset()
("`t" * $stopLoop) + "Reset Loop: $stopLoop"
$stopLoop++
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell.
Locale: en-US
ms.date: 07/17/2023
ms.date: 10/26/2023
no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
Expand Down Expand Up @@ -995,7 +995,7 @@ foreach ($num in ("one","two", "three"))
if ($num -eq "two" -and $stopLoop -lt 2)
{
$foreach.Reset() | Out-Null
$foreach.Reset()
("`t" * $stopLoop) + "Reset Loop: $stopLoop"
$stopLoop++
}
Expand Down

0 comments on commit d82e627

Please sign in to comment.