Back to FabImage Studio website

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

SetArrayElement


Module: FoundationLite

Sets an element of an array to a new value.

Name Type Range Description
Input will be modified ioArray <T>Array
Input value inIndex Integer 0 - Index within the array
Input value inInverse Bool Determines if the indices are counted from beginning or from end of the input array
Input value inNewValue <T> Value 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}
inIndex = 3
inNewValue = 6
outArray = {1,4,3,6,5}

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 Index out of range in SetArrayElement.

Complexity Level

This filter is available on Advanced Complexity Level.

See Also

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