Difference between revisions of "Template:LSL Function/list/element"
Jump to navigation
Jump to search
m |
|||
(16 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{LSL_Function/negative index|true|{{{2| | {{LSL Injection Test}}{{LSL_Function/negative index|true|{{{2|none_}}}}}{{#if: | ||
{{#vardefine:p_{{{1|none}}}_desc|List containing the element of interest.}} | {{#vardefine:p_{{{1|none}}}_desc|List containing the element of interest.}} | ||
{{#vardefine:p_{{{2| | |||
{{#vardefine:{{#if:{{{ | {{#vardefine:p_{{{2|none_}}}_desc|Index of the element of interest.}} | ||
If | |||
}}<includeonly>{{LSLC|List/Read Element}}</includeonly> | {{#vardefine:header_footnote|{{#if:{{{return|}}}|{{#if:{{#var:header_footnote}}|{{#var:header_footnote}}<br/>}} | ||
If {{LSLP|{{{2|none}}}}} describes a location not in {{LSLP|{{{1|none}}}}} then {{{return|}}} is returned.{{#if:{{{3|}}}|<br/> | |||
{{#if:{{{nc|}}} | |||
|If the type of the element at {{LSLP|{{{2|none}}}}} in {{LSLP|{{{1|none}}}}} is not a [[{{{3|}}}{{#var:lang}}|{{{3|}}}]] then {{{return|}}} is returned. <br/> | |||
Here is a workaround: <code>([[{{{3|}}}{{#var:lang}}|{{{3|}}}]])[[llList2String{{#var:lang}}|llList2String]]({{LSL Param|{{{1|none}}}}}, {{LSL Param|{{{2|none}}}}});</code> | |||
|If the type of the element at {{LSLP|{{{2|none}}}}} in {{LSLP|{{{1|none}}}}} is not a [[{{{3|}}}{{#var:lang}}|{{{3|}}}]] it is [[typecast]] to a [[{{{3|}}}{{#var:lang}}|{{{3|}}}]]. {{#if:{{{nf|}}}||If it cannot be typecast {{{return|}}} is returned.}}}}}}|{{#var:header_footnote}}}}}} | |||
}}<includeonly>{{LSLC|List/Read Element{{#var:lang}}}}</includeonly><noinclude> | |||
{| {{Prettytable}} | |||
|-{{Hl2}} | |||
! #var | |||
! value | |||
|- | |||
{{VarPair|p_{{{1|none}}}_desc}} | |||
|- | |||
{{VarPair|p_{{{1|none_}}}_desc}} | |||
|- | |||
{{VarPair|header_footnote}} | |||
|- | |||
{{VarPair|spec}} | |||
|- | |||
{{VarPair|constants_nb}} | |||
|- | |||
{{VarPairTable|also_articles}} | |||
|} | |||
</noinclude> |
Latest revision as of 20:03, 10 June 2012
#var | value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
p_none_desc | List containing the element of interest. | |||||||||
p_none__desc | Index of the element of interest. | |||||||||
header_footnote |
none_ supports negative indexes. | |||||||||
spec |
Indexes
| |||||||||
constants_nb | ||||||||||
also_articles |
|