ARRAY::APPEND
1g 2024-03-19 laplante@plcb.ca GOWEB/ARRAY — Append Elements to an Arraytitle: “ARRAY::APPEND” version: “1g” date: 2024-03-19 author: “laplante@plcb.ca”
array::append Append Elements to an Array
**array::append**(array[, error: variable, value...])
**append**(array[, error: variable, value...])
The append
function adds one or more values to the end of an array, increasing its size.
It returns a new array with the appended elements.
If error
is provided, any operation error will be stored in that variable instead of causing an immediate failure.
res={{
a := [1,2,3];
b := append(a, 4, 5, 6);
a; "\n";
b; "\n";
}}.
Returns:
[1,2,3]
[1,2,3,4,5,6]
laplante@plcb.ca