Difference between revisions of "Template:LSL Function/negative index"

From Second Life Wiki
Jump to navigation Jump to search
m
(cleaning up the logic (omg what a mess) now it's almost readable)
Line 4: Line 4:
Exclude p1, p2, or p3 if not used.
Exclude p1, p2, or p3 if not used.


{{#vardefine:also_articles|{{!}}Test}}
{{#vardefine:also_articles|{{LSL DefineRow||Test}}}}
{{#vardefine:ni_mode|false}}
{{#vardefine:ni_mode|true}}
{{#vardefine:ni_p1|number}}
{{#vardefine:ni_p1|number}}
<!--{{#vardefine:ni_p2|p2}}
<!--{{#vardefine:ni_p2|p2}}
Line 11: Line 11:


</noinclude>{{#if:
</noinclude>{{#if:
{{#vardefine:t|{{#ifeq:{{{1|{{#var:ni_mode}}}}}|true|{{#if:{{{2|{{#var:ni_p1}}}}}|LSL_Function/negative_index/{{#if:{{{3|{{#var:ni_p2}}}}}|range|single}}}}}}}}
{{{{#var:t}}|{{{2|{{#var:ni_p1}}}}}|{{{3|{{#var:ni_p2}}}}}|{{{4|{{#var:ni_p3}}}}}}}
{{#vardefine:also_articles|{{#var:also_articles}}
{{#vardefine:also_articles|{{#var:also_articles}}
{{#ifeq:{{{1|{{#var:ni_mode}}}}}|true|{{LSL_DefineRow||{{LSLGC|Negative_Index{{#var:lang}}|Negative Index}}|}} {{#vardefine:t|{{#ifeq:{{{1|{{#var:ni_mode}}}}}|true|{{#if:{{{2|{{#var:ni_p1}}}}}|LSL_Function/negative_index/{{#if:{{{3|{{#var:ni_p2}}}}}|range|single}}}}}}}}{{#if:{{{2|{{#var:ni_p1}}}}}|{{{{#var:t}}|{{{2|{{#var:ni_p1}}}}}|{{{3|{{#var:ni_p2}}}}}|{{{4|{{#var:ni_p3}}}}}}}}}}}}}
{{#if:{{#var:t}}|{{LSL_DefineRow||{{LSLGC|Negative_Index{{#var:lang}}|Negative Index}}|}}}}}}
{{#vardefine:header_footnote|{{#if:{{#var:header_footnote}}|{{#var:header_footnote}}<br/>}}{{#if: {{{1|{{#var:ni_mode}}}}}| {{#if:{{{2|{{#var:ni_p1}}}}}|'''{{{2|{{#var:ni_p1}}}}}'''{{#if:{{{3|{{#var:ni_p2}}}}}|{{#if:{{{4|{{#var:ni_p3}}}}}|, '''{{{3|{{#var:ni_p2}}}}}''' & '''{{{4|{{#var:ni_p3}}}}}'''|&#32;& '''{{{3|{{#var:ni_p2}}}}}'''}}}}|This function}} {{#ifeq:{{{1|{{#var:ni_mode}}}}}|false| ''does not'' support | support{{#if:{{{3|{{#var:ni_p2}}}}}||s}} {{#ifeq:{{NAMESPACE}}|Template||{{#if:{{#var:self}}{{{self|}}}||{{LSLC|Negative Index{{#var:lang}}}}}}}}}} {{LSLGC|Negative_Index{{#var:lang}}|negative indexes}}.}}}}
 
{{#vardefine:header_footnote|{{#if:{{#var:header_footnote}}|{{#var:header_footnote}}<br/>}}{{#if: {{{1|{{#var:ni_mode}}}}}| {{#if:{{{2|{{#var:ni_p1}}}}}|'''{{{2|{{#var:ni_p1}}}}}'''{{#if:{{{3|{{#var:ni_p2}}}}}|{{#if:{{{4|{{#var:ni_p3}}}}}|, '''{{{3|{{#var:ni_p2}}}}}''' & '''{{{4|{{#var:ni_p3}}}}}'''|&#32;& '''{{{3|{{#var:ni_p2}}}}}'''}}}}|This function}} {{#if:{{#var:t}}| support{{#if:{{{3|{{#var:ni_p2}}}}}||s}}| ''do{{#if:{{{3|{{#var:ni_p2}}}}}||es}} not'' support }} {{LSLGC|Negative_Index{{#var:lang}}|negative indexes}}.}}}}
 
{{#vardefine:footer|{{#var:footer}}
{{#if:{{#var:t}}|{{#ifeq:{{NAMESPACE}}|Template||{{#if:{{#var:self}}{{{self|}}}||{{LSLC|Negative Index{{#var:lang}}}}}}}}}}}}
 
}}<noinclude>
}}<noinclude>
==Debugging==
==Debugging==
Line 24: Line 34:
|-
|-
{{VarPair|spec}}
{{VarPair|spec}}
|-
{{VarPair|caveats}}
|-
|-
{{VarPair|constants_nb}}
{{VarPair|constants_nb}}
|-
|-
{{VarPairTable|also_articles}}
{{VarPairTable|also_articles}}
|-
{{VarPair|footer}}
|}
|}
</noinclude>
</noinclude>

Revision as of 16:26, 17 April 2009

Format: {{LSL Function/negative index|boolean|p1|p2|p3}}
Exclude p1, p2, or p3 if not used.




Debugging

#var value
header_footnote number supports negative indexes.
spec
caveats
constants_nb
also_articles
•  Test
•  Negative Index
footer