Difference between revisions of "Template:LSL Function/negative index/range"
Jump to navigation
Jump to search
Line 26: | Line 26: | ||
See {{LSLGC|Negative_Index#Range Functions|negative indexes}} for more information. | See {{LSLGC|Negative_Index#Range Functions|negative indexes}} for more information. | ||
}}{{#vardefine:p_{{{1|none}}}_desc|{{{1|start}}} index | }}{{#vardefine:p_{{{1|none}}}_desc|{{{1|start}}} index | ||
}}{{#vardefine:p_{{{2|none}}}_desc|{{{ | }}{{#vardefine:p_{{{2|none}}}_desc|{{{2|end}}} index | ||
}}<noinclude>{{#var:spec}}</noinclude> | }}<noinclude>{{#var:spec}}</noinclude> |
Revision as of 17:49, 6 March 2007
Index | Positive | Negative |
---|---|---|
First | 0 | -length |
Last | length - 1 | -1 |
Mentally first translate any negative indexes into positive indexes
|
Positive indexes past the length (after the last index), or negative indexes past the beginning (before the first index) are valid. The effects are predictable, the entries are treated as if they were there but were removed just before output.
See negative indexes for more information.