Difference between revisions of "Array.explode()"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "* << Z3 Home * Z3 Language Documentation * Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member F...")
 
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
  
 
Explode each element into a sequence from StartIndex (default 0), incrementing by By (default 1). This is repeated until RecurseTillLevel (default 0) of the last leaf of the multidimensional array.
 
Explode each element into a sequence from StartIndex (default 0), incrementing by By (default 1). This is repeated until RecurseTillLevel (default 0) of the last leaf of the multidimensional array.
 +
 +
1..10.explode()
 +
 +
{| class="wikitable"|-
 +
| 0
 +
|-
 +
| 0 || 1
 +
|-
 +
| 0 || 1 || 2
 +
|-
 +
| 0 || 1 || 2 || 3
 +
|-
 +
| 0 || 1 || 2 || 3 || 4
 +
|-
 +
| 0 || 1 || 2 || 3 || 4 || 5
 +
|-
 +
| 0 || 1 || 2 || 3 || 4 || 5 || 6
 +
|-
 +
| 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7
 +
|-
 +
| 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8
 +
|-
 +
| 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9
 +
|}
 +
 +
MAGICSQUARE(3).explode(1,1,1)
 +
 +
{| class="wikitable"|-
 +
|
 +
{| class="wikitable"|-
 +
| 1
 +
|-
 +
| 2
 +
|}
 +
||
 +
{| class="wikitable"|-
 +
| 1
 +
|-
 +
| 2
 +
|-
 +
| 3
 +
|-
 +
| 4
 +
|-
 +
| 5
 +
|-
 +
| 6
 +
|-
 +
| 7
 +
|}
 +
||
 +
{| class="wikitable"|-
 +
| 1
 +
|-
 +
| 2
 +
|-
 +
| 3
 +
|-
 +
| 4
 +
|-
 +
| 5
 +
|-
 +
| 6
 +
|}
 +
 +
|-
 +
|
 +
{| class="wikitable"|-
 +
| 1
 +
|-
 +
| 2
 +
|-
 +
| 3
 +
|-
 +
| 4
 +
|-
 +
| 5
 +
|-
 +
| 6
 +
|-
 +
| 7
 +
|-
 +
| 8
 +
|-
 +
| 9
 +
|}
 +
||
 +
{| class="wikitable"|-
 +
| 1
 +
|-
 +
| 2
 +
|-
 +
| 3
 +
|-
 +
| 4
 +
|-
 +
| 5
 +
|}
 +
||
 +
{| class="wikitable"|-
 +
| 1
 +
|}
 +
 +
|-
 +
|
 +
{| class="wikitable"|-
 +
| 1
 +
|-
 +
| 2
 +
|-
 +
| 3
 +
|-
 +
| 4
 +
|}
 +
||
 +
{| class="wikitable"|-
 +
| 1
 +
|-
 +
| 2
 +
|-
 +
| 3
 +
|}
 +
||
 +
{| class="wikitable"|-
 +
| 1
 +
|-
 +
| 2
 +
|-
 +
| 3
 +
|-
 +
| 4
 +
|-
 +
| 5
 +
|-
 +
| 6
 +
|-
 +
| 7
 +
|-
 +
| 8
 +
|}
 +
 +
|}
 +
 +
 +
==See Also==
 +
[[Array.implode() | Implode]]
 +
 +
[[Array.unimplode() | Unimplode]]
 +
 +
[[Array.unimplodeleaf() | Unimplodeleaf]]

Latest revision as of 23:55, 16 April 2020


Array.explode(StartIndex, By, RecurseTillLevel)

Explode each element into a sequence from StartIndex (default 0), incrementing by By (default 1). This is repeated until RecurseTillLevel (default 0) of the last leaf of the multidimensional array.

1..10.explode()

0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5
0 1 2 3 4 5 6
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8 9

MAGICSQUARE(3).explode(1,1,1)

1
2
1
2
3
4
5
6
7
1
2
3
4
5
6
1
2
3
4
5
6
7
8
9
1
2
3
4
5
1
1
2
3
4
1
2
3
1
2
3
4
5
6
7
8


See Also

Implode

Unimplode

Unimplodeleaf