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 / Windows-8.1 & 8 / Windows-7 & Vista / Windows Server 2008-2016
»»»» ColorConsole



 


... Home  
... Impressum
... ColorConsole

... CMD
... Netsh-XP
... Netsh-7
... Netsh-Vista
... Powershell





;-)









Download the Windows 7 Starter, Home (Basic Premium), Professional und Ultimate!

... facebook.de
0.061
Die Dateizuordnungen auf Windows-8.1 Metro Anwendungen sind frustrierend!  / Wie kann ich den FTP-Clientmodus im FileZilla von Passiv- auf Aktiven-Modus umstellen?  / Gibt es einen Unterschied zwischen Dateiverwaltung und Dateimanagement?  / How to create a Windows 8 or 8.1 desktop shortcut for fast shutdown, log off, restart?  / Wozu IsMyHdOK, wenn es schon ähnliche Programme gibt!  / Disable preview in the Taskbar of Windows 10, how to?  / Wie formatiere ich die Festplatte unter Windows 7?  / Wie kann ich die Explorer Dateiliste für Excel exportieren?  / Updates anzeigen oder deinstallieren in Windows 8.1 / 10!  / Customize the size of the icons in the task bar of Windows 8.1 and 10!  / How can I use multiple virtual desktops on Windows 10?  / Where are the Start Menu settings in Windows 10?  /