Back to FabImage Studio website
You are here: Start » Filter Reference » Array Composition » InsertToArray
Inserts a new element to an array at a specified location.
Name | Type | Range | Description | |
---|---|---|---|---|
ioArray | <T>Array | |||
![]() |
inValue | <T> | Input value to be inserted | |
![]() |
inIndex | Integer | 0 - ![]() |
Input index within the inArray at which the inValue will be placed |
![]() |
inInverse | Bool | Reversed order in the array |
The type of this filter is defined using the type variable T which represents any valid type. Read more.
Examples
![]() |
![]() |
inArray = {1,2,3,4,5} inIndex = 1 inValue = 10 |
outArray = {1,10,2,3,4,5} |
![]() |
![]() |
inArray = {1,2,3,4,5} inIndex = 5 inValue = 10 |
outArray = {1,2,3,4,5,10} |
Errors
This filter can throw an exception to report error. Read how to deal with errors here: Error Handling
Error type | Description |
---|---|
DomainError | Index out of range in InsertToArray. |
Complexity Level
This filter is available on Basic Complexity Level.