BIS fnc addToPairs: Difference between revisions
Jump to navigation
Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki) |
m (1 revision) |
(No difference)
|
Revision as of 15:08, 25 July 2014
Description
- Description:
/* Description: Adds given value to pair array, stored under unique key. If value is found: a) both values are scalars: values are added and stored as a single scalar b) one or both values are array: values are added and stored as a single array c) anything else: an array is created and both values are stored there Remarks: Function by default modifies the input array. This can be overrriden by setting '_copyArray' param to true. Syntax: _pairs:array = [_pairs:array,_key:string,_value:number,_copyArray:bool] call BIS_fnc_addToPairs; Example: [["apple",3],["pear",12]] = [[["apple",3],["pear",2]],"pear",10] call BIS_fnc_addToPairs; [["apple",1],["pear",2]] = [[["apple",3],["pear",2]],"apple",-2] call BIS_fnc_addToPairs; [["greetings",["Hello!","Hi!"]],["rudewords",""]] = [[["greetings","Hello!"],["rudewords",""]],"greetings","Hi!"] call BIS_fnc_addToPairs; */ #define SCALAR (typeName 123) #define ARRAY (typeName [])
(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