Description
This function removes the first (leftmost) element of an array and returns it.
The array is passed by reference so changes inside the function will be reflected outside of it.
Note
Arma 3: In Arma 3, use
array deleteAt 0.
Syntax
[array] call BIS_fnc_arrayShift
Parameters:
array: Array - NOTE: given array must be within an array (e.g[[10, 20, 30]] call BIS_fnc_arrayShift)
Returns: Anything - the removed element
Examples
Example 1
private _myArray = ["2", "report", "status"];
_removedElement = [_myArray] call BIS_fnc_arrayShift; // array is -within an array-
_removedElement == "2"; // true
_myArray isEqualTo ["report", "status"]; // true