Array.set

Sets an entry by index.

Arguments

The

value
to set.
index
is an integer number, zero-based. If the index is out of range, an error will occur.

Return values

None

Complexity

Constant

Example

"sl/array" useFile a: (1 2 0 5 "Hello" 0.3) makeArray; 3 a.at print "newValue" 3 a.set LF print 3 a.at print
Output:
5 newValue