aset
aset — sets an array element to a value at a given index.
aset (array, index, value)
arrayAn array.
indexA numeric index into the array.
valueThe new value to be placed in the array.
The value argument.
Sets an array element to the
value at the index. If the
index is past the end of the array, then the array will be extended with
nils to the index and
the value inserted.
![]() | |
This function can also be called using square bracket syntax for referencing array elements, with the syntax: array[index] |
Gamma>x = array (3, 5, #b, nil);[3 5 b nil]Gamma>aset(x, 3, 7);7Gamma>x;[3 5 b 7]Gamma>x[0] = 9;9Gamma>x;[9 5 b 7]Gamma>