reverse: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
Line 5: Line 5:


|1.24|Game version=
|1.24|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 11: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''reverse''' array |SYNTAX=
| [[reverse]] array |SYNTAX=


|p1= array: [[Array]] |PARAMETER1=
|p1= array: [[Array]] |PARAMETER1=
Line 20: Line 19:
|x1= <code>_arr = [1,2,3];
|x1= <code>_arr = [1,2,3];
[[reverse]] _arr;
[[reverse]] _arr;
[[hint]] [[str]] _arr; //[3,2,1]</code> |EXAMPLE1=
[[hint]] [[str]] _arr; {{cc|[3,2,1]}}</code> |EXAMPLE1=


|x2= <code>_wordArr = [[toArray]] "gateman";
|x2= <code>_wordArr = [[toArray]] "gateman";
[[reverse]] _wordArr;
[[reverse]] _wordArr;
[[hint]] [[toString]] _wordArr; //nametag</code> |EXAMPLE1=
[[hint]] [[toString]] _wordArr; {{cc|nametag}}</code> |EXAMPLE2=


____________________________________________________________________________________________
____________________________________________________________________________________________


| [[set]], [[resize]], [[select]], [[in]], [[find]], [[toArray]], [[toString]], [[forEach]], [[count]], [[pushBack]], [[pushBackUnique]], [[apply]], [[append]], [[sort]], [[param]], [[params]], [[arrayIntersect]], [[splitString]], [[joinString]] |SEEALSO=
| [[set]], [[resize]], [[select]], [[in]], [[find]], [[toArray]], [[toString]], [[forEach]], [[count]], [[pushBack]], [[pushBackUnique]], [[apply]], [[append]], [[sort]], [[param]], [[params]], [[arrayIntersect]], [[splitString]], [[joinString]] |SEEALSO=
}}
}}


Line 37: Line 35:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>


[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Revision as of 02:29, 21 December 2019

Hover & click on the images for description

Description

Description:
Reverses given array by reference (modifies the original array, just like resize).
Groups:
Uncategorised

Syntax

Syntax:
reverse array
Parameters:
array: Array
Return Value:
Nothing

Examples

Example 1:
_arr = [1,2,3]; reverse _arr; hint str _arr; // [3,2,1]
Example 2:
_wordArr = toArray "gateman"; reverse _wordArr; hint toString _wordArr; // nametag

Additional Information

See also:
setresizeselectinfindtoArraytoStringforEachcountpushBackpushBackUniqueapplyappendsortparamparamsarrayIntersectsplitStringjoinString

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

Notes

Bottom Section