The section "Accessing and updating vectors" includes:
A vector v can have an index index using [v with index = expression]. Similarly, a sub-range of v can be updated using [v with n .. m = expression] [...]
Note "index index". I presume that inadvertent.
Also, this could benefit some further explanation and examples.
Does the expression [x with 1 = 2] create a new array with the same size and type as x, but with the value at index 1 set to 2?
It's not clear what these expressions using with do, or how to best use them.
The section "Accessing and updating vectors" includes:
Note "index index". I presume that inadvertent.
Also, this could benefit some further explanation and examples.
Does the expression
[x with 1 = 2]
create a new array with the same size and type asx
, but with the value at index 1 set to 2?It's not clear what these expressions using
with
do, or how to best use them.