![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Re: Multidimensional Arrays [vPodans] $a = (1,2),(3,4) [vPodans] $a += ,(5,6) [vPodans] $a[0] 1 2 [vPodans] $a[1] 3 4 [vPodans] $a[2] 5 6 [vPodans] $a[2][0] 5 [vPodans] $a[2][1] 6 enjoy! -- WBR, Vadims Podans MVP: PowerShell PowerShell blog - www.sysadmins.lv "Jo" <Jo@xxxxxx> rakstīja ziņojumā "news:6B8C9E87-4EF3-4AB6-A869-D743CA8804BE@xxxxxx"... Quote: > Hi, > > here is an example from > http://blogs.msdn.com/powershell/arc...wershell.aspx: > > $a = (1,2),(3,4) # array of two elements, each of which is a two element > array > $a += ,(5,6) # add another element which is an array of two element. > > The blog entry also shows how to access the array elements: > > PS (61) > $a[0] > 1 > 2 > > PS (62) > $a[1] > 3 > 4 > > PS (63) > $a[2] > 5 > 6 > > But how would you access an array element within the array, i.e. element 6 > only? > > Thanks, > Jo |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Multidimensional Arrays "Jo" wrote: Quote: > Hi, > > here is an example from > http://blogs.msdn.com/powershell/arc...wershell.aspx: > > $a = (1,2),(3,4) # array of two elements, each of which is a two element > array > $a += ,(5,6) # add another element which is an array of two element. > > The blog entry also shows how to access the array elements: > > PS (61) > $a[0] > 1 > 2 > > PS (62) > $a[1] > 3 > 4 > > PS (63) > $a[2] > 5 > 6 > > But how would you access an array element within the array, i.e. element 6 > only? whatever) about dealing with multidimensional arrays in PowerShell? Thanks, Jo |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Multidimensional Arrays "Vadims Podans [MVP]" wrote: Quote: > [vPodans] $a = (1,2),(3,4) > [vPodans] $a += ,(5,6) > [vPodans] $a[0] > 1 > 2 > [vPodans] $a[1] > 3 > 4 > [vPodans] $a[2] > 5 > 6 > [vPodans] $a[2][0] > 5 > [vPodans] $a[2][1] > 6 Joachim |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Multidimensional Arrays check this: http://www.techotopia.com/index.php/...PowerShell_1.0 -- WBR, Vadims Podans MVP: PowerShell PowerShell blog - www.sysadmins.lv "Jo" <Jo@xxxxxx> rakstīja ziņojumā "news:8935F77D-21C2-4FA0-9718-654DA66A0581@xxxxxx"... Quote: > "Jo" wrote: > Quote: >> Hi, >> >> here is an example from >> http://blogs.msdn.com/powershell/arc...wershell.aspx: >> >> $a = (1,2),(3,4) # array of two elements, each of which is a two element >> array >> $a += ,(5,6) # add another element which is an array of two element. >> >> The blog entry also shows how to access the array elements: >> >> PS (61) > $a[0] >> 1 >> 2 >> >> PS (62) > $a[1] >> 3 >> 4 >> >> PS (63) > $a[2] >> 5 >> 6 >> >> But how would you access an array element within the array, i.e. element >> 6 >> only? > Another question: Anybody has a good reference (blog, web site, book, > whatever) about dealing with multidimensional arrays in PowerShell? > > Thanks, > Jo |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Is there a simple way to search a multidimensional array? | PowerShell | |||
| I NEED HELP creating a multidimensional array from a csv file | VB Script | |||
| Multidimensional arrays | PowerShell | |||
| multidimensional array initialization | PowerShell | |||
| Bug with multidimensional arrays | PowerShell | |||