🐐 Array functions

This commit is contained in:
2026-04-25 18:18:13 +02:00
parent d03af56e67
commit 3a80c4e941
9 changed files with 132 additions and 2 deletions

View File

@@ -361,6 +361,21 @@ Returns the keys of `dict` as an array.
Sorts an array in ascending order. Returns a new sorted array. All elements must be the same type — integers, fractions, or strings. Integers and fractions sort numerically; strings sort lexicographically.
### ADDE
`ADDE(array, value)`
Returns a new array with `value` appended at the end. The original array is unchanged.
### TOLLE
`TOLLE(array, idx)`
Returns a new array with the element at 1-based position `idx` removed. The index must be an integer in the range `[I, LONGITVDO(array)]`; out-of-range indices raise an error.
### INSERE
`INSERE(array, idx, value)`
Returns a new array with `value` inserted at 1-based position `idx`, shifting later elements one position to the right. The index must be an integer in the range `[I, LONGITVDO(array) + I]`; passing `LONGITVDO(array) + I` is equivalent to `ADDE`.
### SENATVS
`SENATVS(bool, ...)` or `SENATVS([bool])`