码迷,mamicode.com
首页 > 系统相关 > 详细

PowerShell【do while篇】

时间:2017-06-30 18:55:51      阅读:253      评论:0      收藏:0      [点我收藏+]

标签:until   pow   shell   pre   结果   do while   shel   color   log   

1 $num=0
2 while($num -le 10)
3 {
4 $num
5 $num+=1
6 }
1 $num=0
2 do
3 {
4 $num
5 $num+=1
6 }
7 while($num -le 10)

或是用until

1 $num=0
2 do
3 {
4 $num
5 $num+=1
6 }
7 until($num -gt 10)

 结果

0
1
2
3
4
5
6
7
8
9
10

 

PowerShell【do while篇】

标签:until   pow   shell   pre   结果   do while   shel   color   log   

原文地址:http://www.cnblogs.com/XiaoCY/p/7100057.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!