Difference between revisions of "Lowest"

From Sega Retro

m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#vardefine:x|{{{1|9999}}} }}
+
<includeonly>{{clearvar|lowest}}{{#fornumargs:  
{{#ifexpr:{{{2|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{2}}} }}
+
| nnn
{{#ifexpr:{{{3|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{3}}} }}
+
| {{#if: {{#var:nnn}} | {{#iferror: {{#expr:{{#var:nnn}}}} ||{{#if:{{#var:lowest}}||{{#vardefine:lowest|{{#var:nnn}}}}}}{{#ifexpr: {{#var:nnn}}<{{#var:lowest}} | {{#vardefine:lowest|{{#var:nnn}}}} }}}} }}}}{{#if:{{{var|}}}|{{#vardefine:{{{var|}}}|{{#var:lowest}}}}|{{#var:lowest}}}}</includeonly><noinclude>
{{#ifexpr:{{{4|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{4}}} }}
+
This template returns the lowest number from a series of numbers.
{{#ifexpr:{{{5|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{5}}} }}
+
 
{{#ifexpr:{{{6|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{6}}} }}
+
Use the parameter <tt>var</tt> to send the value to a variable instead of displaying it.{{lowest|poop}}
{{#ifexpr:{{{7|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{7}}} }}
+
[[Category:Templates]]</noinclude>
{{#ifexpr:{{{8|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{8}}} }}
 
{{#ifexpr:{{{9|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{9}}} }}
 
{{#ifexpr:{{{10|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{10}}} }}
 
{{#ifexpr:{{{11|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{11}}} }}
 
{{#ifexpr:{{{12|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{12}}} }}
 
{{#ifexpr:{{{13|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{13}}} }}
 
{{#ifexpr:{{{14|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{14}}} }}
 
{{#ifexpr:{{{15|9999}}}<{{{#var:x}}}|{{#vardefine:x|{{{15}}} }}
 
{{{#var:x}}}
 

Latest revision as of 13:18, 1 January 2022

This template returns the lowest number from a series of numbers.

Use the parameter var to send the value to a variable instead of displaying it.