Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Array » Array Basics » SetMultipleArrayElements

SetMultipleArrayElements


Module: FoundationLite

Sets elements of an array to new values.

Name Type Description
ioArray <T>Array
inIndices IntegerArray Indices within the array
inInverse Bool Determines if the indices are counted from beginning or from end of the input array
inNewValues <T>Array Values to be set

The type of this filter is defined using the type variable T which represents any valid type. Read more.

Examples

inArray = {1,4,3,2,5}
inIndices = {0,2,4}
inNewValues = {8,7,6}
outArray = {8,4,7,2,6}

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Inconsistent array lengths in SetMultipleArrayElements.
DomainError Index out of range in SetMultipleArrayElements.

Complexity Level

This filter is available on Advanced Complexity Level.

See Also

  • GetArrayElement – Extracts a single element from an array at the specified index.