Difference between revisions of "Template:Quick links smart lingo"
Jump to navigation
Jump to search
Kevin Wang (talk | contribs) |
Kevin Wang (talk | contribs) m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{#vardefine:index|{{{1|1}}}}}{{#if:{{Quick links lingo|{{#var:index}}}} | + | {{#vardefine:index|{{{1|1}}}}}{{Add|index|1}}{{#if:{{Quick links lingo|{{#var:index}}}} |
|{{Quick links lingo|{{#var:index}}}} | |{{Quick links lingo|{{#var:index}}}} | ||
|{{#vardefine:minindex|{{#var:index}}}}{{#vardefine:maxindex|1}}<!-- | |{{#vardefine:minindex|{{#var:index}}}}{{#vardefine:maxindex|1}}<!-- | ||
Line 11: | Line 11: | ||
{{#vardefine:index|{{#expr:floor(({{#var:maxindex}}+{{#var:minindex}})/2)}}}} | {{#vardefine:index|{{#expr:floor(({{#var:maxindex}}+{{#var:minindex}})/2)}}}} | ||
}}{{#vardefine:adjusted_index|{{#expr:({{{1|1}}} mod {{#var:index}})}}}}{{#ifexpr:{{#var:adjusted_index}}=0|{{#vardefine:adjusted_index|{{#var:index}}}}}}{{Quick links lingo|{{#var:adjusted_index}}}} | }}{{#vardefine:adjusted_index|{{#expr:({{{1|1}}} mod {{#var:index}})}}}}{{#ifexpr:{{#var:adjusted_index}}=0|{{#vardefine:adjusted_index|{{#var:index}}}}}}{{Quick links lingo|{{#var:adjusted_index}}}} | ||
− | }} | + | }}<noinclude> |
− | <noinclude> | + | Incremental improvement on [[Template:Quick links lingo]] |
+ | |||
When index i <= # of lingo quips, return quip straight away. If i > #, it'll wrap around (mod #). | When index i <= # of lingo quips, return quip straight away. If i > #, it'll wrap around (mod #). | ||
Line 19: | Line 20: | ||
! Quip | ! Quip | ||
|- | |- | ||
− | |1||{{Quick links smart lingo|1}} | + | |1||{{Quick links smart lingo|1}} Test sentence |
|- | |- | ||
− | |2||{{Quick links smart lingo|2}} | + | |2||{{Quick links smart lingo|2}} Test sentence |
|- | |- | ||
− | |3||{{Quick links smart lingo|3}} | + | |3||{{Quick links smart lingo|3}} Test sentence |
|} | |} | ||
</noinclude> | </noinclude> |
Latest revision as of 15:59, 1 January 2023
Confused what a "vulcher" is? Incremental improvement on Template:Quick links lingo
When index i <= # of lingo quips, return quip straight away. If i > #, it'll wrap around (mod #).
Index | Quip |
---|---|
1 | Confused what a "vulcher" is? Test sentence |
2 | Want to find out about "superpowers"? Test sentence |
3 | Wondering just what makes something "important"? Test sentence |