From Second Life Wiki
|LSL Portal||Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials|
Ranges & Indexes
The easiest way to explain how ranges works is to make all indexes positive. Negative indexes are just a way of counting from the tail end instead of the beginning, all negative indexes have a corresponding equivalent positive index (assuming they are in range). Positive indexes past length (after the last index), or negative indexes past the beginning (before the first index) are valid and the effects are predictable and reliable: the entries are treated as if they were there but were removed just before output.
- If <= then the range operated on starts at and ends at . [ , ]
- Exclusion range: If > then the range operated on starts at 0 and goes to and then starts again at and goes to -1. [0, ] + [ , -1]
- If -1]. is a negative index past the beginning, than the operating range would be [ ,
- If 0, ]. is a positive index past the end, than the operating range would be [
- If both and are out of bounds than the function would have no operating range (effectively inverting what the function is supposed to do).
See negative indexes for more information.
function list llList2List( list src, integer start, integer end );