Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/2042-standardlibrary-generic-arrayindexof.md
T
2026-06-23 21:47:51 +08:00

37 lines
750 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ArrayIndexOf
Searches for the first occurrence of a value in a one-dimensional array.
```
template<typename T>
int ArrayIndexOf(
   T&         array[],         // an array for search
   T          value,           // the search value
   const int  start_index,     // the starting index
   const int  count            // the search range
   );
```
Parameters
&array[]
[out]  The array to search in.
value
[in]  The searched value.
start_index
[in] The starting index from which the search begins.
count
[in]  The length of the search range.
Return Value
Returns the index of the first found element. If the value is not found, returns -1.