Difference between revisions of "Lowest"

From Sega Retro

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

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.