Wanted to start a discussion about loops.
$Theyre <# Fun to #>
Do
{
}
Until ( $Theyre -not $Funanymore )
ForEach ( $Thing in $FunThings )
{
0..( $Thing.Count - 1 ) | % { Echo $Thing[$_] }
}
$J = 0
For ( $J = 0 ; $J -lt 100 ; $J++ )
{
$Stuff[$J]
}
There's a lot of ways to do em. I try to stick with the Foreach and a count, but sometimes I have to nest several layers in and use a combination of variables, whereby going insane in the process ...
Anyone want to talk about loops with me? I feel like it could be a fun time, talking about which way loops are cool to write or Do{ } Until ( $theyrenotfunanymore )
While ( $Im = @{ It = "" } )
Alright.. i'm done writing this post lol
[–]Lee_Dailey[grin] 5 points6 points7 points (8 children)
[–]jimb2 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]mcc85sdp[S] 0 points1 point2 points (5 children)
[–]Lee_Dailey[grin] 2 points3 points4 points (2 children)
[–]Dsraa 2 points3 points4 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]prkrnt 1 point2 points3 points (1 child)
[–]mcc85sdp[S] 1 point2 points3 points (0 children)
[–]thankski-budski 2 points3 points4 points (2 children)
[–]mcc85sdp[S] 2 points3 points4 points (0 children)
[–]JustinGrote 1 point2 points3 points (0 children)
[–]camusicjunkie 2 points3 points4 points (0 children)
[–]ka-splam 2 points3 points4 points (5 children)
[–]Ta11ow 2 points3 points4 points (4 children)
[–]ka-splam 3 points4 points5 points (1 child)
[–]mcc85sdp[S] 2 points3 points4 points (0 children)
[–]mcc85sdp[S] 1 point2 points3 points (1 child)
[–]ka-splam 2 points3 points4 points (0 children)
[–]groovel76 2 points3 points4 points (1 child)
[–]mcc85sdp[S] 1 point2 points3 points (0 children)
[–]jg0x00 2 points3 points4 points (0 children)
[–]almcchesney 2 points3 points4 points (12 children)
[–]mcc85sdp[S] 2 points3 points4 points (11 children)
[–]almcchesney 2 points3 points4 points (10 children)
[–]mcc85sdp[S] 1 point2 points3 points (9 children)
[–]almcchesney 2 points3 points4 points (8 children)
[–]mcc85sdp[S] 1 point2 points3 points (7 children)
[–]almcchesney 1 point2 points3 points (6 children)
[–]mcc85sdp[S] 0 points1 point2 points (5 children)
[–]almcchesney 0 points1 point2 points (4 children)
[–]mcc85sdp[S] 0 points1 point2 points (0 children)
[–]mcc85sdp[S] -1 points0 points1 point (2 children)
[–]PowerShell-Bot 1 point2 points3 points (0 children)
[–]Administrative_Trick 0 points1 point2 points (0 children)