Difference between revisions of "Template:Trivia format box scale"

From QBWiki
Jump to navigation Jump to search
(Created page with "{{#vardefine:s|{{{1|}}}}}<!-- -->{{#vardefine:l|{{#len:{{#var:s}}}}}}<!-- -->{{#vardefine:min|0}}<!-- -->{{#vardefine:peak|}}<!-- -->{{#vardefine:max|0}}<!-- -->{{#vardefine:i...")
 
Line 16: Line 16:
 
--><!---->}}}}}}<!--
 
--><!---->}}}}}}<!--
 
--><!---->|Please provide an input string of 1-3 digits{{#vardefine:invalid|1}}}}<!--
 
--><!---->|Please provide an input string of 1-3 digits{{#vardefine:invalid|1}}}}<!--
-->|Please provide an input string of 1-3 digits{{#vardefine:invalid|1}}}}{{#if:{{#var:invalid}}||<div style="font-family:monospace;">{{#loop:i|0|10|{{#ifexpr:{{#var:i}}>={{#var:min}}|{{#ifexpr:{{#var:i}}<={{#var:max}}|{{#if:{{#var:peak}}|{{#ifexpr:{{#var:i}}={{#var:peak}}|X|x}}|X}}|<nowiki>-</nowiki>}}|<nowiki>-</nowiki>}}}}</div>}}<noinclude>
+
-->|Please provide an input string of 1-3 digits{{#vardefine:invalid|1}}}}{{#if:{{#var:invalid}}||<span style="font-family:monospace;">{{#loop:i|0|10|{{#ifexpr:{{#var:i}}>={{#var:min}}|{{#ifexpr:{{#var:i}}<={{#var:max}}|{{#if:{{#var:peak}}|{{#ifexpr:{{#var:i}}={{#var:peak}}|X|x}}|X}}|<nowiki>-</nowiki>}}|<nowiki>-</nowiki>}}}}</span>}}<noinclude>
 
0 - x(y)z, where x, y, and z are numbers. x is bottom of range and z is top; y is optional peak and must be in [x, z]
 
0 - x(y)z, where x, y, and z are numbers. x is bottom of range and z is top; y is optional peak and must be in [x, z]
  
Line 24: Line 24:
 
|-
 
|-
 
|<nowiki>{{Trivia format box scale}}</nowiki>
 
|<nowiki>{{Trivia format box scale}}</nowiki>
|{{Trivia format box scale}}
+
|x {{Trivia format box scale}} y
 
|-
 
|-
 
|<nowiki>{{Trivia format box scale|0}}</nowiki>
 
|<nowiki>{{Trivia format box scale|0}}</nowiki>
|{{Trivia format box scale|0}}
+
|x {{Trivia format box scale|0}} y
 
|-
 
|-
 
|<nowiki>{{Trivia format box scale|9}}</nowiki>
 
|<nowiki>{{Trivia format box scale|9}}</nowiki>
|{{Trivia format box scale|9}}
+
|x {{Trivia format box scale|9}} y
 
|-
 
|-
 
|<nowiki>{{Trivia format box scale|09}}</nowiki>
 
|<nowiki>{{Trivia format box scale|09}}</nowiki>
|{{Trivia format box scale|09}}
+
|x {{Trivia format box scale|09}} y
 
|-
 
|-
 
|<nowiki>{{Trivia format box scale|009}}</nowiki>
 
|<nowiki>{{Trivia format box scale|009}}</nowiki>
|{{Trivia format box scale|009}}
+
|x {{Trivia format box scale|009}} y
 
|-
 
|-
 
|<nowiki>{{Trivia format box scale|099}}</nowiki>
 
|<nowiki>{{Trivia format box scale|099}}</nowiki>
|{{Trivia format box scale|099}}
+
|x {{Trivia format box scale|099}} y
 
|-
 
|-
 
|<nowiki>{{Trivia format box scale|46}}</nowiki>
 
|<nowiki>{{Trivia format box scale|46}}</nowiki>
|{{Trivia format box scale|46}}
+
|x {{Trivia format box scale|46}} y
 
|-
 
|-
 
|<nowiki>{{Trivia format box scale|456}}</nowiki>
 
|<nowiki>{{Trivia format box scale|456}}</nowiki>
|{{Trivia format box scale|456}}
+
|x {{Trivia format box scale|456}} y
 
|-
 
|-
 
|<nowiki>{{Trivia format box scale|4567}}</nowiki>
 
|<nowiki>{{Trivia format box scale|4567}}</nowiki>
|{{Trivia format box scale|4567}}
+
|x {{Trivia format box scale|4567}} y
 
|}
 
|}
 
</noinclude>
 
</noinclude>

Revision as of 13:02, 31 January 2022

Please provide an input string of 1-3 digits 0 - x(y)z, where x, y, and z are numbers. x is bottom of range and z is top; y is optional peak and must be in [x, z]

Input Output
{{Trivia format box scale}} x Please provide an input string of 1-3 digits y
{{Trivia format box scale|0}} x X--------- y
{{Trivia format box scale|9}} x ---------X y
{{Trivia format box scale|09}} x XXXXXXXXXX y
{{Trivia format box scale|009}} x Xxxxxxxxxx y
{{Trivia format box scale|099}} x xxxxxxxxxX y
{{Trivia format box scale|46}} x ----XXX--- y
{{Trivia format box scale|456}} x ----xXx--- y
{{Trivia format box scale|4567}} x Please provide an input string of 1-3 digits y