question

Laurenz Peleman avatar image
0 Likes"
Laurenz Peleman asked Laurenz Peleman answered

Append Array to empty Array

Dear all

I want to construct an Array of Arrays using the available Array. operators maximally. I start with an empty array A = Array[0] and want to add e.g. the Arrays [1,2,3] and [4,5,6] subsequently, to end up with the Array A = Array[2] = {[1,2,3],[4,5,6]}.

However, using the append operation twice on A, i.e. A.append([1,2,3]) followed by A.append([4,5,6]), I end up with A = {1,2,3,4,5,6}, not really what I want. Is there a simple way to force the append operation to treat the Array parameter as one row element to be added, instead of as a group of separate elements?

Thanks in advance, kind regards

Laurenz Peleman

Choose One
array
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Laurenz Peleman avatar image
1 Like"
Laurenz Peleman answered

Question solved, .push did the trick

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.