reverse: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
m (template:command argument fix)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Reverses given array by reference (modifies the original array, just like [[resize]]). |= Description
| Reverses given array by reference (modifies the original array, just like [[resize]]). |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''reverse''' array |= Syntax
| '''reverse''' array |SYNTAX=


|p1= array: [[Array]] |= Parameter 1
|p1= array: [[Array]] |PARAMETER1=


| [[Nothing]] |= Return value
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_arr = [1,2,3];
|x1= <code>_arr = [1,2,3];
[[reverse]] _arr;
[[reverse]] _arr;
[[hint]] [[str]] _arr; //[3,2,1]</code> |= Example 1
[[hint]] [[str]] _arr; //[3,2,1]</code> |EXAMPLE1=


|x2= <code>_wordArr = [[toArray]] "gateman";
|x2= <code>_wordArr = [[toArray]] "gateman";
[[reverse]] _wordArr;
[[reverse]] _wordArr;
[[hint]] [[toString]] _wordArr; //nametag</code> |= Example 1
[[hint]] [[toString]] _wordArr; //nametag</code> |EXAMPLE1=


____________________________________________________________________________________________
____________________________________________________________________________________________


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


}}
}}

Revision as of 14:45, 7 April 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