03-07-2016 04:15 AM
At first, sorry for my english.
I have a problem with this function, I want insert an element into array of size 16 in function to index, but when I insert an element in the position 4 (for example) and then, I insert other element in the position 2, the element who was in the position 4 is moved to the position 5 and I don't understan why
Can you help me? thank you
Solved! Go to Solution.
03-07-2016 04:34 AM - edited 03-07-2016 04:35 AM
Insert into array will increase the size of the array and therefore anything that comes after your insert index will have it's index increased by the number of elements you are inserting.
If you want to replace an element in an array - use 'replace array subset'.
Here's an example:
Output:
03-07-2016 04:35 AM
Hi cllorab
If you use a "Insert into Array" function, then it Inserts an element into n-dim array at the point you specify in index, thereby moving down the other elements.
If you use " Replace Array Subset" Function, then Replaces an element or subarray in an array at the point you specify in index.
03-07-2016 04:50 AM