-
Notifications
You must be signed in to change notification settings - Fork 0
append
ffredyk edited this page Jul 23, 2026
·
1 revision
Array
Binary — <array> append <otherArray>.
<array> append <array>
Appends all elements from the right-hand array into the left-hand array. This is a bulk operation — more efficient than repeated pushBack calls. No return value (void).
Calls List<Value>.AddRange() on the underlying list. All elements from the source array are added in order. The source array is not modified.
_arr1 = [1, 2, 3];
_arr2 = [4, 5, 6];
_arr1 append _arr2; // _arr1 is [1,2,3,4,5,6]_allUnits = [];
_allUnits append _infantry;
_allUnits append _vehicles;
_allUnits append _air;_concat = {
params ["_a", "_b"];
_result = [];
_result append _a;
_result append _b;
_result
};
_combined = [_arr1, _arr2] call _concat;// Bad — many individual pushes
{ _target pushBack _x } forEach _source;
// Good — single bulk append
_target append _source;Not thread-safe. Both arrays must belong to the current scheduler.
- pushBack — append single element
- deleteRange — remove range of elements
- resize — change array size
- select — element access
- Getting Started
- Language Guide
- Type System
- Control Flow
- Functions & Code
- Strings & Text
- Arrays & Collections
- Concurrency
- Promise System
- Thread Safety
- Host API & Embedding
- CLI Tool
- Bytecode Reference
- Multiplayer
- Syntax Sugar
- Optimization Guide
- Benchmarks
- count
- select
- pushBack
- append
- deleteAt
- deleteRange
- resize
- reverse
- sort
- find
- in
- forEach
- freeze
- thaw
- isFrozen
- currentScheduler
- clientOwner
- allSchedulers
- schedulerName
- schedulerExists
- schedulerBudget
- setSchedulerBudget
- fiberCount
- readyFiberCount
- waitingFiberCount
- schedulerLoad
- sendTo