November 1999
Intermediate to advanced
832 pages
19h 28m
English
The linsert command inserts elements into a list value at a specified index. If the index is zero or less, then the elements are added to the front. If the index is equal to or greater than the length of the list, then the elements are appended to the end. Otherwise, the elements are inserted before the element that is currently at the specified index.
lreplace replaces a range of list elements with new elements. If you don't specify any new elements, you effectively delete elements from a list.
Note: linsert and lreplace do not modify an existing list. Instead, they return a new list value. In the following example, the lreplace command does not change the value of x:
Read now
Unlock full access