6
我熟悉基本range operator:省略號在PowerShell中做什麼?
.. Range operator
Represents the sequential integers in an integer array, given an upper and lower boundary.
1..10
10..1
foreach ($a in 1..$max) {write-host $a}
不過,我無意中用省略號(...
),而不是運營商的範圍今日(..
),並發現它從N個枚舉下降到0出於某種原因:
PS C:\> 5...3
5
4
3
2
1
0
發生了什麼事?
不錯的答案:) powershell繼續驚歎,呃? ;) – manojlds