BIS fnc arrayShift: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Function " to "{{RV|type=function ")
m (Text replacement - "\{\{ *codecomment *\| *\/\/ *([^ ]+) *\}\} " to "{{cc|$1}}")
Line 19: Line 19:


|x1= <code>_myArray = ["2", "report", "status"];
|x1= <code>_myArray = ["2", "report", "status"];
_removedElement = [_myArray] [[call]] [[BIS_fnc_arrayShift]]; {{codecomment|// array is '''within an array'''}}
_removedElement = [_myArray] [[call]] [[BIS_fnc_arrayShift]]; {{cc| array is '''within an array'''}}_removedElement == "2"; {{cc| true}}_myArray [[isEqualTo]] ["report", "status"]; {{codecomment|// true}}</code>
_removedElement == "2"; {{codecomment|// true}}
_myArray [[isEqualTo]] ["report", "status"]; {{codecomment|// true}}</code>


| [[deleteAt]], [[pushBack]]
| [[deleteAt]], [[pushBack]]

Revision as of 16:30, 29 January 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Arrays

Syntax

Syntax:
Syntax needed
Parameters:
array: Array - NOTE: given array must be within an array (e.g [[10, 20, 30]] call BIS_fnc_arrayShift)
Return Value:
Return value needed

Examples

Example 1:
_myArray = ["2", "report", "status"]; _removedElement = [_myArray] call BIS_fnc_arrayShift; // array is within an array_removedElement == "2"; // true_myArray isEqualTo ["report", "status"]; // true

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