Jump to content

ଛାଞ୍ଚ:Convert/4

ଉଇକିପିଡ଼ିଆ‌ରୁ

୧୦×୨୦×୩୦×୪୦ metres (33×66×98×130 ft)

The converter Template:Convert/4 will convert 4 amounts at once, allowing a mix of different range words between the 4 amounts. However, all 4 amounts are treated as the same unit type. The output unit must be specified, or put "0" to default.
Usage:  {{convert/4 |1|by|2|by|3|by|4|m|ft}}
{{convert/4 |1|x|2|x|3|x|4|m|ft}}
{{convert/4 |1|-|2|-|3|-|4|m|ft}}
{{convert/4 |7|to|8|by|3|to|4.5|km|mi|abbr=on}}

The template has the same parameters as Template:Convert, and so it allows abbreviation abbr=in or abbr=out or abbr=none, wikilinks lk=in or lk=out, and adjective mode adj=on or adj=mid. The separator can also be a semicolon: disp=semi, disp=semicolon, disp=or, disp=comma, disp=x (customized), disp=b (default as parentheses) and "disp=output only".

The examples show a mixture of "by" & "x" or "to" or "rarely" (etc.) in some conversions:

  • {{convert/4 |5|by|6|or|7|by|8|m|ft}}     gives: ୫ by ୬ or ୭ by ୮ metres (16 by 20 or 23 by 26 ft)
  • {{convert/4 |5|x|6|x|7|up to|8|m|ft}} gives: ୫×୬×୭ up to ୮ metres (16×20×23 up to 26 ft)
  • {{convert/4 |7|to|8|,|9|or|10|km|mi}} gives: ୭ to ୮, ୯ or ୧୦ kilometres (4.3 to 5.0, 5.6 or 6.2 mi)
  • {{convert/4 |7|to|8|not|9|to|10|km|mi|abbr=on}}    gives: ୭ to ୮ not ୯ to ୧୦ km (4.3 to 5.0 not 5.6 to 6.2 mi)
  • {{convert/4 |7|to|8|to|9|to|10|km|mi|adj=on}}      gives: ୭-to-୮-to-୯-to-୧୦-kilometre (4.3-to-5.0-to-5.6-to-6.2 mi)
  • {{convert/4 |5|to|6|rarely|7|to|8|m|ft}} → ୫ to ୬ rarely ୭ to ୮ metres (16 to 20 rarely 23 to 26 ft)
  • {{convert/4 |5|x|6|by|7|-|8|m|ft}} → ୫×୬ by ୭–୮ metres (16×20 by 23–26 ft)
  • {{convert/4 |10|-|20|, summer|25|-|30|°C|F|disp=or}} → ୧୦–୨୦, summer ୩୦–୪୦ degrees Celsius or 50–68, summer 86–104 °F
  • {{convert/4 |11|-|13|-|15|-|17|°C|F|disp=semi}}     gives: ୧୧–୧୩–୧୫–୧୭ degrees Celsius; 52–55–59–63 °F
  • {{convert/4 |40|-|50|-|60|-|70|°F|C|lk=on }} gives: ୪୦–୫୦–୬୦–୭୦ degrees Fahrenheit (4–10–16–21 °C)
  • {{convert/4 |45|-|55|rising to|65|-|75|°F|C|lk=out}}     gives: ୪୫–୫୫ rising to ୬୫–୭୫ degrees Fahrenheit (7–13 rising to 18–24 °C)

The range-words are: to, -, and, or, by, +/-, x, but slash ("/"), comma, or anything is allowed. Display types: disp=comma, disp=semi, disp=or, disp=output only, disp=output number only, disp=x and disp=b. The numeric results are identical to using Template:Convert for each amount individually.

Common problems

[ସମ୍ପାଦନା]

Note the name of this template is "convert/4" and omitting the suffix "/4" can cause the error message: "Template loop detected: Template:Convert/x". Be sure to put a range-word (such as "x") between each of the 4 amounts, to avoid error "Convert/4 - Invalid parameter 2".

The 4 amounts, with 3 range-words, are followed by a unit-code (such as "m") as the 8th parameter. The output unit-code can be "0" as the 9th parameter, to allow the default output unit to be triggered.