File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Most keywords will be implemented as a Transpiler that tranforms a CommandAST.
77| ------------------------| --------------------------------|
88| [ Assert] ( Assert.psx.ps1 ) | [ Assert keyword] ( Assert.psx.ps1 ) |
99| [ New] ( New.psx.ps1 ) | [ 'new' keyword] ( New.psx.ps1 ) |
10+ | [ Until] ( Until.psx.ps1 ) | [ until keyword] ( Until.psx.ps1 ) |
1011
1112
1213
@@ -114,3 +115,41 @@ Most keywords will be implemented as a Transpiler that tranforms a CommandAST.
114115 .> { (new PowerShell).AddScript("Get-Command").Invoke() }
115116~~~
116117
118+ ## Until Example 1
119+
120+
121+ ~~~ PowerShell
122+ {
123+ $x = 0
124+ until ($x == 10) {
125+ $x
126+ $x++
127+ }
128+ } |.>PipeScript
129+ ~~~
130+
131+ ## Until Example 2
132+
133+
134+ ~~~ PowerShell
135+ {
136+ until "00:00:05" {
137+ [DateTime]::Now
138+ Start-Sleep -Milliseconds 500
139+ }
140+ } | .>PipeScript
141+ ~~~
142+
143+ ## Until Example 3
144+
145+
146+ ~~~ PowerShell
147+ Invoke-PipeScript {
148+ $tries = 3
149+ until (-not $tries) {
150+ "$tries tries left"
151+ $tries--
152+ }
153+ }
154+ ~~~
155+
You can’t perform that action at this time.
0 commit comments