! (Vector)

Sets a coordinate of a vector by index.

Arguments

New

value
to be set for the vector coordinate.
index
is an integer number, zero-based. If the index is out of range, an error will occur.
The
vector
(see Vector) to set the element of.

Return values

None

Complexity

Constant

Example

"sl/algebra" useFile v1: (1.0 2.0 3.0) makeVector; 4.0 1 v1 ! 1 v1 @ print
Output:
4.000000