Difference between revisions of "Template:Convert/LoffAonSoff"

From Self-sufficiency
Jump to: navigation, search
m (Parser function errors)
 
m (1 revision)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{convert/{{#if:{{{4|}}}|s}}{{#if:{{{3|}}}|p}}round|{{{1}}}|{{{2}}}/{{{b}}}|{{{3}}}|{{{4}}}|{{{j}}}}}&nbsp;{{{u}}}</includeonly><noinclude>{{pp-template}}
+
{{convert/outsep<noinclude>{{{?}}}</noinclude>
 +
| 1={{convert/{{#if:{{{4|}}}|s}}{{#if:{{{3|}}}|p}}round<noinclude>{{{?}}}</noinclude>|{{{1}}}|{{#expr:( {{{2|1}}} )/{{{b|4}}}}}|{{{3}}}|{{{4}}}|{{{j}}}
 +
}}| sep={{#if:{{{u|}}}
 +
  |{{#ifexpr:abs( ( {{{2|1}}} )/{{{b|4}}} ) < 20000
 +
    |&nbsp;|&#32;}}<!--
 +
-->|&#32;}}|
 +
2={{#if:{{{u|}}}
 +
  |{{{u}}}|{{{n}}}}}|
 +
3={{#if:{{{u|}}}
 +
  |{{{u|}}}|{{{l|{{{n}}}s}}}}}}}<noinclude>
 +
{{pp-template}}
 +
This '''[[Template:Convert/LoffAonSoff]]''' invokes [[Template:Convert/outsep]] to display the converted result and unit symbol (if any), with {sep} to control wrapping. A number < 1,000 is not wrapped, or if the unit symbol is used, then only numbers above 20,000 can wrap at the unit symbol. If the unit symbol {{{u}}} is not set (such as with "acre"), then it passes both the singular unit name {{{n}}} and plural, {{{l}}}, or "{{{n}}}s" when no specific plural name has been defined.
 +
 
 
[[Category:Subtemplates of Template Convert]]
 
[[Category:Subtemplates of Template Convert]]
 
</noinclude>
 
</noinclude>

Latest revision as of 14:54, 10 December 2011

{{convert/outsep{{{?}}} | 1={{convert/round{{{?}}}|{{{1}}}|0.25|{{{3}}}|{{{4}}}|{{{j}}} }}| sep= | 2={{{n}}}| 3={{{n}}}s}} This Template:Convert/LoffAonSoff invokes Template:Convert/outsep to display the converted result and unit symbol (if any), with {sep} to control wrapping. A number < 1,000 is not wrapped, or if the unit symbol is used, then only numbers above 20,000 can wrap at the unit symbol. If the unit symbol {{{u}}} is not set (such as with "acre"), then it passes both the singular unit name {{{n}}} and plural, {{{l}}}, or "{{{n}}}s" when no specific plural name has been defined.