Difference between revisions of "Template:LSL Function/negative index/range"
Jump to navigation
Jump to search
m |
m (order matters!) |
||
Line 1: | Line 1: | ||
{{#if: | {{#if: | ||
{{#vardefine:p_{{{1|start}}}_desc|{{{1|start}}} index}} | |||
{{#vardefine:p_{{{2|end}}}_desc|{{{2|end}}} index}} | |||
{{#vardefine:notes|{{#var:notes}}{{PBR}} | {{#vardefine:notes|{{#var:notes}}{{PBR}} | ||
Line 13: | Line 17: | ||
See {{LSLGC|Negative_Index#Range Functions|negative indexes}} for more information. | See {{LSLGC|Negative_Index#Range Functions|negative indexes}} for more information. | ||
}} | }} | ||
}}<noinclude> | }}<noinclude> |
Revision as of 10:26, 12 June 2012
#var | value |
---|---|
p_start_desc | start index |
p_end_desc | end index |
spec | |
notes |
Ranges & IndexesThe 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.
See negative indexes for more information. |
caveats |