Insert Into Array function
Object information | |
---|---|
Owning palette(s) | Array palette |
Type | Function |
Requires | Basic Development Environment |
Icon |
The Insert Into Array function inserts one or more elements or subarrays into an array.
Usage
Connect an array of any type to the n-dim array input terminal and a new element or subarray to n or n-1 dim array. This will add the new element(s) to the end of the array.
Specify an index at the index terminal to insert element(s) at any other position in the source array.
Insert multiple elements by dragging the upper or lower side of the node. This will increase the number of element(s) at the second, third, ... position starting at the specified index.
The input terminal n or n-1 dim array (n or n-1 dimensional array) only accepts elements that have the same number of dimensions as the input array or one dimension less. It is not possible to insert a single element into a 2-dimensional array, because it must be at least one-dimensional. Attempting to do so will result in broken wires.
Best practice
- Do not specify an index to add elements or subarrays to the end of the array.