Cold Help System: Programming: ColdC Reference Manual: Functions: List: insert()


LIST insert(LIST list, INTEGER pos, ANY value)

This function inserts value into list before the element specified by the integer pos. If pos is outside the range of the list, the error ~range is thrown. Examples:

insert([2, 3, 4], 3, 'foo)
=> [2, 3, 'foo, 4]
insert(["foo", 'bar, ~none], 4, 'baz)
=> ["foo", 'bar, ~none, 'baz]

The function listgraft() performs a similar role to insert().


delete() | insert() | join() | listgraft() | listlen() | replace() | setadd() | setremove() | sublist() | union() | listidx()


the Cold Dark