BIS fnc arrayFindDeep: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
||
Line 25: | Line 25: | ||
|r1= [[Array]] - Returns array with index of found element, if it was not found it returns -1 | |r1= [[Array]] - Returns array with index of found element, if it was not found it returns -1 | ||
|x1= <code>[ [1,2,3,4,5], 3 ] call | |x1= <code>[ [1,2,3,4,5], 3 ] call BIS_fnc_arrayFindDeep;//Returns [2]</code> | ||
|seealso= [[BIS_fnc_addToPairs]] [[find]] [[select]] [[BIS_fnc_removeIndex]] | |seealso= [[BIS_fnc_addToPairs]] [[find]] [[select]] [[BIS_fnc_removeIndex]] | ||
}} | }} |
Revision as of 22:36, 12 July 2022
Description
- Description:
- Searches an array for a specific value and returns its index.
- Execution:
- call
- Groups:
- Arrays
Syntax
- Syntax:
- [array,value] call BIS_fnc_arrayFindDeep
- Parameters:
- array: Array - Array to be searched
- value Anything - Value to be searched for
- Return Value:
- Array - Returns array with index of found element, if it was not found it returns -1
Examples
- Example 1:
[ [1,2,3,4,5], 3 ] call BIS_fnc_arrayFindDeep;//Returns [2]
Additional Information
- See also:
- BIS_fnc_addToPairs find select BIS_fnc_removeIndex
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note