![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Info: I know I know this... but I can't remember for nothing... Loop Index? Isn't there a variable that will give you current loop index? -- Brandon Shell --------------- Stop by my blog some time ![]() http://www.bsonposh.com/ Try the "Search of Powershell Blogs" -------------------------------------- |
| | #2 (permalink) |
| Guest | Re: I know I know this... but I can't remember for nothing... Loop Index? "Brandon Shell" <tshell.mask@gmail.com> wrote in message news:uXJCqAtSHHA.4076@TK2MSFTNGP05.phx.gbl... > Isn't there a variable that will give you current loop index? > Perhaps you are thinking of the variable $foreach that let's you access the enumerator object in a foreach statement. However this doesn't give you current loop index. It does give you the current value and the ability to directly call MoveNext(). When switch is looping, I think it has a similar variable $switch that does the same thing. -- Keith |
| | #3 (permalink) |
| Guest | RE: Info: I know I know this... but I can't remember for nothing... Lo Are you thinking of $foreach Refers to the enumerator in a foreach loop. -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "Brandon Shell" wrote: > Isn't there a variable that will give you current loop index? > > -- > Brandon Shell > --------------- > Stop by my blog some time ![]() > http://www.bsonposh.com/ > Try the "Search of Powershell Blogs" > -------------------------------------- > > |
| | #4 (permalink) |
| Guest | Re: I know I know this... but I can't remember for nothing... Loop Index? Thanks Keith/Rich... $foreach was what I was thinking, but I misunderstood it's use. I was hoping to have a loop count so I could avoid having to create my own... oh well ![]() -- Brandon Shell --------------- Stop by my blog some time ![]() http://www.bsonposh.com/ Try the "Search of Powershell Blogs" -------------------------------------- "Keith Hill" <r_keith_hill@mailhot.nospamIdotcom> wrote in message news:16FBB6CD-BC2E-4542-BFCF-636F6490B41E@microsoft.com... > "Brandon Shell" <tshell.mask@gmail.com> wrote in message > news:uXJCqAtSHHA.4076@TK2MSFTNGP05.phx.gbl... >> Isn't there a variable that will give you current loop index? >> > > Perhaps you are thinking of the variable $foreach that let's you access > the enumerator object in a foreach statement. However this doesn't give > you current loop index. It does give you the current value and the > ability to directly call MoveNext(). When switch is looping, I think it > has a similar variable $switch that does the same thing. > > -- > Keith |
| | #5 (permalink) |
| Guest | Re: I know I know this... but I can't remember for nothing... Loop Index? $foreach ;-) (in foreach statement not foreach-object iirc) greetings /\/\o\/\/ "Brandon Shell" <tshell.mask@gmail.com> wrote in message news:uXJCqAtSHHA.4076@TK2MSFTNGP05.phx.gbl... > Isn't there a variable that will give you current loop index? > > -- > Brandon Shell > --------------- > Stop by my blog some time http://www.bsonposh.com/> Try the "Search of Powershell > Blogs" -------------------------------------- > |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vista doesn't remember install info | Markj | Vista General | 2 | 06-27-2008 01:43 PM |
| Live Messenger doesn't remember my sign in info after restart. | TheGregDude | Live Messenger | 9 | 04-22-2008 06:21 PM |
| How do I change the administrator info and the registration info?? | Heather | Vista account administration | 3 | 05-31-2007 11:01 AM |
| MAP network drive does not remember logon info | David Hettel | Vista networking & sharing | 0 | 12-23-2006 05:43 AM |
| i remember win95 | olli | Vista hardware & devices | 2 | 06-11-2006 02:03 PM |