BIS fnc arrayFindDeep: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "")
m (Text replacement - ">\[ +(.*) *\] +(call|spawn)" to ">[$1] $2")
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|gr1= Arrays|GROUP1=
|game3= tkoh
|version3= 1.00


| Searches an array for a specific value and returns its index.|Description=
|game4= arma3
|version4= 0.50


| [array,value] call [[BIS_fnc_arrayFindDeep]] |Syntax=
|gr1= Arrays


|descr= Searches an array for a specific value and returns its index.


|p1= array: [[Array]] - Array to be searched |Parameter 1=
|s1= [array,value] call [[BIS_fnc_arrayFindDeep]]


|p2= value [[Anything]] - Value to be searched for|Parameter 2=
|p1= array: [[Array]] - array to be searched


| [[Array]] - Returns array with index of found element, if it wasn't found it returns -1 |Return value=
|p2= value [[Anything]] - value to be searched for


<!---
|r1= [[Array]] - returns array with index of found element, if it was not found it returns -1
|exec= spawn |Execution=
--->


|x1= <code>[ [1,2,3,4,5], 3 ] [[call]] [[BIS_fnc_arrayFindDeep]];//Returns [2]</code>|Example 1=
|x1= <sqf>[[1,2,3,4,5], 3] call BIS_fnc_arrayFindDeep;//Returns [2]</sqf>


| [[BIS_fnc_addToPairs]], [[find]], [[select]], [[BIS_fnc_removeIndex]] |See also=
|seealso= [[BIS_fnc_addToPairs]] [[find]] [[select]] [[BIS_fnc_removeIndex]]
}}
}}
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:arrayFindDeep}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:arrayFindDeep}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:arrayFindDeep}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:arrayFindDeep}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:arrayFindDeep}}]]

Latest revision as of 18:27, 8 November 2023

Hover & click on the images for description

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