You are here: Start » Function Reference » All Functions » Array Basics » FindAll
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: | fil |
Module: | FoundationLite |
Finds all locations of a given value in the input array.
Syntax
void fil::FindAll ( const ftl::Array<Type>& inArray, const Type& inValue, ftl::Array<int>& outIndices, bool& outFound = ftl::Dummy<bool>() )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inArray | const Array<Type>& | Input array | |
![]() |
inValue | const Type& | Value to look for | |
![]() |
outIndices | Array<int>& | Indices of the value occurrences in the array | |
![]() |
outFound | bool& | Dummy<bool>() |
Examples
![]() |
![]() |
inArray = {2,4,3,2,5} inValue = 2 |
outIndices = {0,3} |
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
Non-comparable complex data type "TypeName" used in FindAll.
See Also
- FisFilter_CountValueInArray – Calculates the number of occurrences of an object in an array.