BIS fnc getFromPairs: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (GVI 1.00 > 1.02 http://dev.arma3.com/post/spotrep-00011)
No edit summary
Line 52: Line 52:
[[Category:Functions|{{uc:getFromPairs}}]]
[[Category:Functions|{{uc:getFromPairs}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:getFromPairs}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:getFromPairs}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on October 2, 2014 - 01:17 (UTC)</dd>
<dt class="note">[[User:Benargee|Benargee]]</dt>
<dd class="note">
[[BIS_fnc_findInPairs]] renamed to [[BIS_fnc_getFromPairs]] and now supports all variable types [http://dev.arma3.com/post/spotrep-00011 Source]
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 02:17, 2 October 2014


Hover & click on the images for description

Description

Description:
/*

	Description:
	Searches the associative array for the 1st occurance of the key string and returns the value associated with it.

	Syntax:
	_value = [_associativeArray:array,_key:string,_defaultValue] call BIS_fnc_getFromPairs;

	Example:
	2 = [[["apple",3],["pear",2]],"pear"] call BIS_fnc_getFromPairs;

	Returns:
	* if found: value stored under the key
	* if not found: nil or _defaultValue
*/

(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:

Additional Information

See also:
See also needed

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

Notes

Bottom Section

Posted on October 2, 2014 - 01:17 (UTC)
Benargee
BIS_fnc_findInPairs renamed to BIS_fnc_getFromPairs and now supports all variable types Source