Aurora Visio Studio TOP » Filter Reference » Array » Array Composition » RemoveValueFromArray
Module: | FoundationLite |
---|
Removes the first or all of the elements of the given value from an array.
Name | Type | Description | |
---|---|---|---|
ioArray | <T>Array | ||
inValue | <T> | Input value to be removed | |
inRemoveAll | Bool | Remove all occurrences, not only the first one |
The type of this filter is defined using the type variable T which represents any valid type. Read more.
Description
The operation removes the first or all of the inArray elements equal to inValue, depending on the inRemoveAll parameter.
Examples
inArray = {1,2,2,0,2} inValue = 2 inRemoveAll = False |
outArray = {1,2,0,2} |
inArray = {1,2,2,0,2} inValue = 2 inRemoveAll = True |
outArray = {1,0} |
Remarks
Please note, that this filter can be concretized only with basic data types and structures of such types. Concretizing the filter with a non-comparable complex data type, such as Image or Region, will raise a Domain Error.
Using this filter to compare data of type Real (or structures with this type) may be tricky. It is caused by the fact that very small (unnoticeable) differences in values of such types may lead to unpredictable negative results in comparison of these values.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
Non-comparable complex data type "TypeName" used in RemoveValueFromArray.
Complexity Level
This filter is available on Advanced Complexity Level.
See Also
- RemoveRangeFromArray – Removes elements at the given indices from the input array.
- InsertToArray – Inserts a new element to an array at a specified location.