BIS fnc subSelect: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "|Game version=" to "|Game version= |gr1= Arrays |GROUP1") |
m (Text replacement - " |GROUP1 ____________________________________________________________________________________________" to " |GROUP1= ____________________________________________________________________________________________") |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
|1.00|Game version= | |1.00|Game version= | ||
|gr1= Arrays |GROUP1 | |gr1= Arrays |GROUP1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 45: | Line 45: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:Functions|{{uc:subSelect}}]] | [[Category:Functions|{{uc:subSelect}}]] | ||
[[Category:{{Name|arma2}}: Functions|{{uc:subSelect}}]] | [[Category:{{Name|arma2}}: Functions|{{uc:subSelect}}]] | ||
[[Category:{{Name|arma2oa}}: Functions|{{uc:subSelect}}]] | [[Category:{{Name|arma2oa}}: Functions|{{uc:subSelect}}]] | ||
[[Category:{{Name|tkoh}}: Functions|{{uc:subSelect}}]] | [[Category:{{Name|tkoh}}: Functions|{{uc:subSelect}}]] | ||
[[Category:{{Name|arma3}}: Functions|{{uc:subSelect}}]] | [[Category:{{Name|arma3}}: Functions|{{uc:subSelect}}]] |
Revision as of 15:37, 13 October 2020
Description
Syntax
- Syntax:
- [array, start, endOrLength] call BIS_fnc_subSelect
- Parameters:
- array: Array array to select sub array from
- start: Number index of array to begin sub-array. If negative, index is counted from the end of array
- endOrLength: Number - index of array to end the sub-array. If ommitted, remainder of the array will be selected. If negative, it specifies the length of the sub-array (in absolute form)
- Return Value:
- Array
Examples
- Example 1:
_array = ["a","b",true,3,8]; [_array, 2] call BIS_fnc_subSelect; // returns [true,3,8]
- Example 2:
[_array, -2] call BIS_fnc_subSelect; // returns [3,8]
- Example 3:
[_array, 1, 3] call BIS_fnc_subSelect; // returns ["b",true,3]
- Example 4:
[_array, 1, -2] call BIS_fnc_subSelect; // returns ["b",true]
Additional Information
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