>>-insert(item-+--------+-)------------------------------------>< +-,index-+
Example 5.168. List class - insert method
musketeers=.list~of("Porthos","Athos","Aramis") /* Creates list MUSKETEERS */ /* consisting of: Porthos */ /* Athos */ /* Aramis */ index=musketeers~first /* Gives index of first item */ musketeers~insert("D'Artagnan",index) /* Adds D'Artagnan after Porthos */ /* List is now: Porthos */ /* D'Artagnan */ /* Athos */ /* Aramis */ /* Alternately, you could use */ musketeers~insert("D'Artagnan",.nil) /* Adds D'Artagnan before Porthos */ /* List is now: D'Artagnan */ /* Porthos */ /* Athos */ /* Aramis */ /* Alternately, you could use */ musketeers~insert("D'Artagnan") /* Adds D'Artagnan after Aramis */ /* List is now: Porthos */ /* Athos */ /* Aramis */ /* D'Artagnan */