<- CRPL reference <- Lists
Arguments | Result | Notation |
---|---|---|
List, Index, Value | None | L1 i1 n1 – |
Sets the value of element i1
in list L1
to n1
Elements are indexed starting with zero, so the third element is at index 2. SetListElement can add a new
element at the end of a list, if i1
is the value of the next index (3 if the list currently has only 3 elements); however, it is recommended to use AppendToList to add items to the end. Attempting to use SetListElement with an index value greater than the last index +1 does nothing.
#Sets element #3 of list01 to the value of 5 <-list01 2 5 SetListElement
Sample list list01
before:
0 - 100
1 - 105
2 - 110
3 - 115
Sample list list01
after sample command:
0 - 100
1 - 105
2 - 5
3 - 115