Difference between revisions 5551603 and 5551617 on simplewiki

<noinclude><!--
-===========================================
- Convert/mix2 - Convert 2 amounts, 2 units
-===========================================
-                      (see NOTES at bottom)
--></noinclude>{{#switch:{{{warn|no}}}
  | y|yes = {{#switch:{{{4|xby}}}
    | and|or|x|xx|by|-|+/-|,|to = <!--ok-->
    | #default = '''<span style="color:#DD6600">[[Template:Convert/mix2|Convert/mix2]] - Invalid<!--
    --> parameter 4''' "{{{4|??}}}" - try: by, to, and,<!--
    --> or, -, +/-, x, xx or comma.&nbsp;</span>
  }}<!--endswitch {4}-->
}}<!--endswitch {warn}--
------------------------------ Check display
-->{{#switch: {{{disp|b}}} <!--switch {disp} #1-->
| 2|#|out| output only|number|output number only =
| #default = <!--
---------------------------- Show amount #1
-->{{convert/numdisp|{{formatnum:{{{1|10}}}|R
    }}}}<!--show amount 1-->{{
  #switch:{{{abbr|def}}}{{{adj|off}}}|off
    | defoff|outoff|offoff|~off = {{
      #ifexprq: {{strlen{1|2}}} |{{padleft:|3|{{{1|2}}}|zz}} < 3 |&nbsp;|&#32|&#32;|&nbsp;}}
    | onoff|inoff = {{
      #ifexprq: {{strlen|{{{1|2}}}|}} < 5 |&nbsp;|&#32{1|2}}} |{{padleft:|5|{{{1|2}}}zzzz}} |&#32;|&nbsp;}}
    | valuesoff =
    | #default = -
  }}<!--endif {adj} off--
----------------------------- Show unit #1
-->{{convert|{{{1|10}}}|{{{2|cm}}}|{{{3|0}}}|abbr={{
  #switch: {{{abbr|off}}}<!--condense 7 values to off/on/comma-->
    | off|out|none|comma|mos = def
    | on|in = on
  }}<!--endswitch {abbr}--
  -->|lk={{{lk|off}}}|adj={{{sing|{{{adj|off}}}}}}<!--
  -->|disp=unit|sp={{{sp|}}} }}<!--show unit
-------------------------------------------
-->{{
  #switch:{{padleft:|1|{{{4|x}}}}}
    | ,|&|<|[|/ =<!--then no -/space-->
    | + = {{#ifeq:{{{4|+}}}|+/-|&nbsp;}}<!--then nobreak space-->
    | x|- = &#32;
    | ± = {{#ifexpr: {{formatnum:{{{5|2}}}|R}} < 100 |&nbsp;|&#32;}}
    |#default={{#ifeq:{{{adj|off}}}|all|-|&#32;}}<!--if hyphen-->
  }}<!--endswitch {4} #a-->{{
  #switch:{{{4|x}}}| x = ×<!--if {4}=x show small-x #b-->
    | - = &ndash;<!--if {4}=hyphen show dash-->
    | +/- = ±<!--if {4}=+/- show plus-minus-->
    | #default={{{4|xx}}}<!--put range-word #1-->
  }}<!--endswitch {4} word #b-->{{
  #switch:{{padleft:|1|{{{4|x}}}}}
    | / =<!--then no -/space-->
    | , = &#32;<!--then space-->
    | x|- = &nbsp;
    | + = &nbsp;<!--then nobreak space-->
    | ± = &nbsp;
    |#default={{#ifeq:{{{adj|off}}}|all|-|&#32;}}<!--if hyphen-->
  }}<!--endswitch {4} #c
----------------------------- Show amount #2
-->{{convert/numdisp|{{formatnum:{{{5|2}}}|R
    }}}}<!--show amount 2 in param.5-->{{
  #switch:{{{abbr|def}}}{{{adj|off}}}|off
    | defoff|outoff|offoff|~off = {{
      #ifexprq: {{strlen{5|2}}} |{{padleft:|3|{{{5|2}}}|zz}} < 3 |&nbsp;|&#32|&#32;|&nbsp;}}
    | onoff|inoff = {{
      #ifexprq: {{strlen|{{{5|2}}}|}} < 5 |&nbsp;|&#32{5|2}}} |{{padleft:|5|{{{5|2}}}zzzz}} |&#32;|&nbsp;}}
    | valuesoff =
    | #default = -
  }}<!--endif {adj} off--
----------------------------- Show unit #2
-->{{convert|{{{5|2}}}|{{{6|m}}}|{{{7|0}}}|abbr={{
  #switch: {{{abbr|off}}}<!--condense 7 values to off/on/comma-->
    | off|out|none|comma|mos = def
(contracted; show full)-04Jan14 Expanded to nowrap small numbers or symbols < 9999.
-04Jan14 Expanded to allow format tags and HTML entities.
-18Mar16 Shorten comments to fit phone view.
-18Mar16 Use adj=all for all hyphens.
-18Mar16 Default precision to highest of 2.
-->
{{documentation}}
</noinclude>