flatten: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| | |game1= arma3 | ||
|version1= 2.02 | |||
|2. | |||
|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= < | |x1= <sqf>flatten [1, [2], [[3]], [[[4]]]]; // returns [1, 2, 3, 4]</sqf> | ||
|x2= < | |x2= <sqf>flatten getUnitLoadout player;</sqf> | ||
|seealso= [[arrayIntersect]] | |seealso= [[arrayIntersect]] | ||
}} | }} |
Latest revision as of 13:45, 5 May 2022
Description
- Description:
- Flattens an array.
- Groups:
- Arrays
Syntax
Examples
- Example 1:
- flatten [1, [2], [[3]], [[[4]]]]; // returns [1, 2, 3, 4]
- Example 2:
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