Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Multi-dimensional arrays

Name: Anonymous 2019-12-16 8:59

Create a Multi-dimensional array:

PS C:\> $MultiArray = @(
("cats","dogs","ravens"),
(40,50,60)
)


PowerShell will automatically number the array elements on an X-Y grid starting at 0.

0 1 2
0 cats dogs ravens
1 40 50 60

PS C:\> $MultiArray[0][2]
ravens


These are actualy 'Jagged' arrays because the dimensions of each row can be a different size. This is very cost-effective storage.

Name: Anonymous 2019-12-16 12:17

>>1
This is very cost-effective storage.
what is the 'cost' with regards to which this is expensive? speed? memory use? those need to be measured before you can make a statement like that. ergonomics? that's true.

also, I don't get the point of this thread. in basically every language with multi-dimensional arrays you can do multi_array[x][y], not just in PowersHell

Name: Anonymous 2019-12-16 22:37

PS C:\> $MultiArray = @(
("cats","doge","ravens"),
(40,50,60)
)

Name: Anonymous 2019-12-16 23:19

array my anus

Name: Anonymous 2019-12-17 6:56

>>4
hax my array

Name: Anonymous 2019-12-17 12:34

arrays are the Billion Dollar Mistake

Name: Anonymous 2019-12-19 15:47

Multi-dimensional CIA niggers

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List