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


LIST sublist(LIST list, INTEGER start[, INTEGER length])

This function returns a subrange of the list specified by list. The subrange starts at position start, and continues length elements. If length is unspecified, it will continue to the end of the list. If start is outside of the range of the list, or length will extend past the end of the list, the error ~range is thrown. Examples:

sublist([2, 3, 4, 5, 6, 7], 2, 3)
=> [3, 4, 5]
sublist([2, 3, 4, 5, 6, 7], 3)
=> [4, 5, 6, 7]
sublist([2, 3, 4, 5, 6, 7], 7)
=> []


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


the Cold Dark