Template:InchDec: Difference between revisions

From The Freestyle Knowledge Base
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<!-- mm = in x 25.4 -->
{{#vardefine:dec|{{{1}}} }}
{{#vardefine:dec|{{{1}}} }}
{{#vardefine:mm|{{#expr: {{{1}}} * 25.4 round 1}} }}
{{#vardefine:mm|{{#expr: {{{1}}} * 25.4 round 1}} }}
{{#vardefine:whole|{{#expr: {{{1}}} round 0}} }}
{{#vardefine:whole|{{#expr: {{{1}}} round 0}} }}
{{#vardefine:float|{{#expr: {{{1}}} - {{#var:whole}} }} }}
{{#vardefine:float|{{#expr: {{{1}}} - {{#var:whole}} }} }}
<!-- Output -->
{{#var:whole}} {{#ifeq:{{#var:float}}|0.375|3/8"|Dame}} ({{{1}}} in, {{#var:mm}} mm)
{{#var:whole}} {{#ifeq:{{#var:float}}|0.375|3/8"|Dame}} ({{{1}}} in, {{#var:mm}} mm)
<!--
7.375" (187.3 mm) 7 3/8"
mm = in x 25.4
-->

Revision as of 01:06, 15 February 2016



Expression error: Unrecognized punctuation character "{". Dame ({{{1}}} in, Expression error: Unrecognized punctuation character "{". mm)