Template:LSL Function/negative index: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 37: | Line 37: | ||
=== Indexes === | === Indexes === | ||
<div style="display:table;"><div style="display:block;"> | <div style="display:table;"><div style="display:block;"> | ||
*Positive indexes count from the beginning, the first item being indexed as '''0''', the last as '''(length - 1)'''. | *Positive indexes count from the beginning, the first item being indexed as '''0''', the last as '''({{{length|length}}} - 1)'''. | ||
</div></div> | </div></div> | ||
<div style="display:table;"><div style="display:block;"> | <div style="display:table;"><div style="display:block;"> | ||
*Negative indexes count from the far end, the first item being indexed as '''-length''', the last as '''-1'''. | *Negative indexes count from the far end, the first item being indexed as '''-{{{length|length}}}''', the last as '''-1'''. | ||
</div></div> | </div></div> | ||
}} | }} | ||
Revision as of 10:59, 12 April 2010
Format:
{{LSL Function/negative index|boolean|p1|p2|p3}}
Exclude p1, p2, or p3 if not used.
Debugging
| #var | value | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| header_footnote |
{{{2}}} supports negative indexes. | ||||||||||
| spec |
Indexes
| ||||||||||
| caveats |
| ||||||||||
| notes | |||||||||||
| constants_nb | |||||||||||
| also_articles |
| ||||||||||
| footer |