<=[[4rpl:start| Index]] \\ <=[[4rpl:start#lists| Lists]] * [[4rpl:commands:getlistelement|Get]] * [[4rpl:commands:setlistelement|Set]] ====== SetListElement ====== SetListElement(<-list <-index <-value) ===== Description ===== Stores a value at the specified index of a list. The previously stored value is overwritten. If a list is stored in a variable, this can be abbreviated to ''<-value ->list[<-index]''. For doing the same thing but with arguments in order of **value, list**, **index**, see [[4rpl:commands:setlistelementrpn|SetListElementRPN]]. ===== Examples ===== 1 2 3 4 5 6 ListN(6) ->list1 1 2 3 4 5 6 ListN(6) ->list2 0 ->index SetListelement(<-list1 <-index "one") # does the same as "one" ->list2 [<-index] <-list1 Trace <-list2 Trace # OUTPUT: # [one, 2, 3, 4, 5, 6] # [one, 2, 3, 4, 5, 6] <=[[4rpl:start| Index]] ~~NOTOC~~