range: allocate an array with a subrange of another objarray
Code Block |
---|
set obj2 [objarray range <obj> <index_start> <index_end>] |
Allocate an array with a sub-range of another objarray
e.g.
Code Block |
---|
set obj [objarray new_from_to intarray 1 5] -> 1 2 3 4 5 set obj2 [objarray range $obj 1 end-2] -> 2 3 |
Indices < 0 or > n are clamped to 0 and n respectively.