flatten: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " | arma3dev |2.01 " to " | arma3 |2.02 ") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma3 | |game1= arma3 | ||
|version1= 2.02 | |||
|2.02 | |||
|gr1= Arrays | |gr1= Arrays | ||
| Flattens an array. | |descr= Flattens an array. | ||
| [[flatten]] array | |s1= [[flatten]] array | ||
|p1= array: [[Array]] | |p1= array: [[Array]] | ||
| [[Array]] - | |r1= [[Array]] - flattened array | ||
|x1= <code>[[flatten]] [ 1, [2], <nowiki>[[3]]</nowiki>, [[[4]]] ]; {{cc| | |x1= <code>[[flatten]] [1, [2], <nowiki>[[3]]</nowiki>, [[[4]]]]; {{cc|returns [1, 2, 3, 4]}}</code> | ||
|x2= <code>[[flatten]] [[getUnitLoadout]] [[player]];</code> | |x2= <code>[[flatten]] [[getUnitLoadout]] [[player]];</code> |
Revision as of 09:53, 9 June 2021
Description
- Description:
- Flattens an array.
- Groups:
- Arrays
Syntax
Examples
- Example 1:
flatten [1, [2], [[3]], [[[4]]]]; // returns [1, 2, 3, 4]
- Example 2:
flatten getUnitLoadout player;
Additional Information
- See also:
- arrayIntersect
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