Back to Aurora Vision Library Lite website
You are here: Start » All Functions » Array Composition » AvsFilter_InsertToArray
AvsFilter_InsertToArray
This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.
Header: | STD.h |
---|---|
Namespace: | avs |
Inserts a new element to an array at a specified location.
Syntax
void avs::AvsFilter_InsertToArray ( atl::Array<Type>& ioArray, const Type& inValue, int inIndex, bool inInverse )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
ioArray | Array<Type>& | ||||
inValue | const Type& | Input value to be inserted | |||
inIndex | int | 0 - | Input index within the inArray at which the inValue will be placed | ||
inInverse | bool | False | Determines if the indices are counted from beginning or from end of the input array |
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
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Index out of range in InsertToArray. |
See Also
- AvsFilter_InsertArrayToArray – Inserts an array at the specified index of another array.
- AvsFilter_AppendToArray – Inserts a new element at the end of an array.