User:Johan G/convert/rear

From FlightGear wiki
Jump to navigation Jump to search

{{User:Johan G/convert/rear}}: Parameter expression missing

The following template description is not displayed when the template is inserted in an article.


This template handles rounding, decimals and units for User:Johan G/convert ("rear" is for rear part of the quantity).

Note When this template draft is moved to the template namespace, give it a better name...


{{User:Johan G/convert/rear|expression|to-unit|decimals|hide-unit}}

The parameters expression and to-unit is manatory, though all parameters should be passed from the main template.

Expression to be calculated with Extension:ParserFunctions's #expr function
Unit to be converted to
Number of decimals. If empty, no decimals will be shown
If not empty the unit will not be shown in the result


Conversion from millimeters to inches as it would be used in the main template...

{{User:Johan G/convert/rear|{{{1}}} div 25.4|in|{{{4|}}}|{{{5|}}}}}

...with the parameters having these values

{{User:Johan G/convert/rear|1000 div 25.4|in|2|}}

39.37 in

Known issues

Trailing zeros in the decimals will not be shown.

Related templates