about_Continue - PowerShell


 

Describes how the Continue statement immediately returns the program flow (about_Continue)

   
# TOPIC
about_Continue

# SHORT DESCRIPTION
Describes how the Continue statement immediately returns the program flow
to the top of a program loop.

# LONG DESCRIPTION
In a script, the Continue statement immediately returns the program flow
to the top of the innermost loop that is controlled by a For, Foreach, or
While statement.

The Continue keyword supports labels. A label is a name you assign to a
statement in a script. For information about labels, see about_Break.

In the following example, program flow returns to the top of the While loop
if the $ctr variable is equal to 5. As a result, all the numbers between 1
and 10 are displayed except for 5:

while ($ctr -lt 10)
{
$ctr +=1
if ($ctr -eq 5) {continue}
Write-Host $ctr
}

Note that in a For loop, execution continues at the first line in the
loop. If the arguments of the For statement test a value that is
modified by the For statement, an infinite loop may result.

SEE ALSO
about_Comparison_Operators

C:\Windows>powershell get-help about_Core_Commands -full

ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2014 Microsoft Corporation.

OS: Windows 10, 8.1, 8, 7, Vista / Windows Server 2016, 2012, 2008
»»»» ColorConsole








Windows-10





Windows-10

... facebook.de
... Windows-10 FAQ
... Windows-10 Info


Become a Sponsor
... Your button here?





PowerShell: Describes how the Continue statement immediately returns the program flow

HTTP: ... PS_Windows/en/about_Continue.htm
0.218
14485

Remove the performance index reader from Windows 10!

 /

What does the number of pings per host in TraceRouteOK ?

 /

Help Windows 10 does not have any libraries, what am I doing wrong?

 /

How can i pictures and posters print from File Explorer Views?

 /

How can I turn off Windows 10 properly?

 /

Windows-10 tool to customize the color profile for a device, where is it? (printer, fax)

 /

How to auto run a program at a certain time in Windows 8.1 / 10?

 /

Neben Schreiben, Löschen und Unbenennen würde ich auch noch gerne Kopieren überwachen?

 /

Turn off the Explorer List View file grouping in the File-Manager!

 /

Wrong decimal symbol in Windows 10, can I customize numbers formats?

 /

Why the Admin Explorer in a Windows delete program?

 /

Can I switch user accounts on windows 8 / 8.1 (customize, swop)?

 /