Difference between revisions of "Numberswitch"
From Sega Retro
(Created page with "<includeonly>{{#vardefine:testvalue|{{{number|0}}}}}{{#vardefine:highestkey|0}}{{#vardefine:output|}}{{#forargs: | key | value | {{#ifeq:{{#var:key}}|number|| {{#ifexpr:{{#var...") |
|||
Line 9: | Line 9: | ||
}}{{#if:{{#var:output}}|{{#var:output}}|{{{1|}}}}} | }}{{#if:{{#var:output}}|{{#var:output}}|{{{1|}}}}} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
− | Displays different text depending on the | + | Displays different text depending on whether a given number is higher than any of the options |
==Usage== | ==Usage== | ||
− | |||
<pre>{{numberswitch | <pre>{{numberswitch |
Revision as of 07:32, 5 June 2020
Displays different text depending on whether a given number is higher than any of the options
Usage
{{numberswitch | number=3 | this is the default | 2=number greater or equals 2 | 3=number greater or equals 3 | 4=number greater or equals 4 }}
returns:
number greater or equals 3