Array concatenation: Difference between revisions
Content added Content deleted
Jazzedpineda (talk | contribs) (Add Plain English) |
|||
Line 2,634: | Line 2,634: | ||
1 1 |
1 1 |
||
1 1 |
1 1 |
||
6 6 |
|||
</pre > |
|||
Adding 2 dimension arrays using OLE clause |
|||
<syntaxhighlight lang="m2000 interpreter"> |
|||
Dim OLE Base 0, A(2,2)=1, B(1,2)=6 |
|||
A()=Cons(A(), B(), A(), B()) |
|||
\\ Restore the dimensions (without erasing items) |
|||
Dim A(Dimension(A(),1)/2, 2) |
|||
For I=0 to Dimension(A(),1)-1 { |
|||
For j=0 to Dimension(A(),2)-1 { |
|||
Print A(i, j), |
|||
} |
|||
Print |
|||
} |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
1 1 |
|||
1 1 |
|||
1 1 |
|||
1 1 |
|||
6 6 |
|||
6 6 |
6 6 |
||
</pre > |
</pre > |