! (Array)

Sets an entry of an array by index.

Arguments

The

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

Return values

None

Complexity

Constant

Example

"sl/array" useFile a: (1 2 0 5 "Hello" 0.3) makeArray; b: a copy; 10 0 a ! a [print "," print TRUE] enum LF print b [print "," print TRUE] enum
Output:
10,2,0,5,Hello,0.300000, 1,2,0,5,Hello,0.300000,