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