BIS fnc arrayInsert: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *(arg|eff|mp|serverExec|gr[0-9]) *= *(.*) * *\|([^=]{12})" to "|$1=$2 |descr=$3") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
| arma2 | |game1= arma2 | ||
|1.00 | |version1= 1.00 | ||
|game2= arma2oa | |game2= arma2oa | ||
Line 17: | Line 17: | ||
|descr= Inserts the elements of one array into another, at a specified index. Neither arrays are touched by reference, a new array is returned. | |descr= Inserts the elements of one array into another, at a specified index. Neither arrays are touched by reference, a new array is returned. | ||
|s1=[array1, array2, index] call [[BIS_fnc_arrayInsert]] | |s1= [array1, array2, index] call [[BIS_fnc_arrayInsert]] | ||
|p1= array1: [[Array]] - array to insert into | |p1= array1: [[Array]] - array to insert into | ||
Line 27: | Line 27: | ||
|r1= [[Array]] - a new array | |r1= [[Array]] - a new array | ||
|x1= <code>_result = [<nowiki/>[0,1,2,3,4], ["a","b","c"], 1] [[call]] [[BIS_fnc_arrayInsert]]; {{ | |x1= <code>_result = [<nowiki/>[0,1,2,3,4], ["a","b","c"], 1] [[call]] [[BIS_fnc_arrayInsert]]; {{cc|returns [0,"a","b","c",1,2,3,4]}}</code> | ||
|seealso= | |||
}} | }} | ||
Revision as of 23:40, 13 June 2021
Description
- Description:
- Inserts the elements of one array into another, at a specified index. Neither arrays are touched by reference, a new array is returned.
- Execution:
- call
- Groups:
- Arrays
Syntax
- Syntax:
- [array1, array2, index] call BIS_fnc_arrayInsert
- Parameters:
- array1: Array - array to insert into
- array2: Array - array to be inserted
- index: Number - insertion index
- Return Value:
- Array - a new array
Examples
- Example 1:
_result = [[0,1,2,3,4], ["a","b","c"], 1] call BIS_fnc_arrayInsert; // returns [0,"a","b","c",1,2,3,4]
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