Difference between revisions of "Template:Hands/numdisp/sandbox"
< Template:Hands | numdisp
Jump to navigation
Jump to search
imported>Jimp |
imported>Jimp (parts is a goner) |
||
Line 6: | Line 6: | ||
-- | -- | ||
--></noinclude>{{#if:{{#titleparts:{{{1|-1200-3~118}}}|1|2}} | --></noinclude>{{#if:{{#titleparts:{{{1|-1200-3~118}}}|1|2}} | ||
− | |{{Convert/numdisp/ | + | |{{Convert/numdisp/frac |
|{{{1|-1200-3/118}}}|{{#titleparts:{{{1|-1200-3/118}}}|1|1}}|{{#titleparts:{{{1|-1200-3/118}}}|1|2}}}}<!--split at "/" | |{{{1|-1200-3/118}}}|{{#titleparts:{{{1|-1200-3/118}}}|1|1}}|{{#titleparts:{{{1|-1200-3/118}}}|1|2}}}}<!--split at "/" | ||
--else-->|{{#ifexpr:{{{1|-14000.00}}} < 0 | --else-->|{{#ifexpr:{{{1|-14000.00}}} < 0 | ||
Line 35: | Line 35: | ||
-- #titleparts to split the number at "/" (if any) and | -- #titleparts to split the number at "/" (if any) and | ||
-- then checks part 2 (the denominator, after the slash) | -- then checks part 2 (the denominator, after the slash) | ||
− | -- to trigger use of {{Convert/numdisp/ | + | -- to trigger use of {{Convert/numdisp/frac}}. Hence, |
-- #if: {{#titleparts:{{{1|6+3/8}}}|1|2}} | -- #if: {{#titleparts:{{{1|6+3/8}}}|1|2}} | ||
-- will be true if a denominator exists (such as "8"). | -- will be true if a denominator exists (such as "8"). | ||
Line 41: | Line 41: | ||
--NOTE N3: This template uses minimal expansion depth of the | --NOTE N3: This template uses minimal expansion depth of the | ||
-- if-else logic by checking for "/" before invoking the | -- if-else logic by checking for "/" before invoking the | ||
− | -- nested subtemplate {{Convert/numdisp/ | + | -- nested subtemplate {{Convert/numdisp/frac}}. The |
-- check for a negative number increases the nesting depth | -- check for a negative number increases the nesting depth | ||
-- by 1 level to apply abs({1}) in a nested {#expr:} parser | -- by 1 level to apply abs({1}) in a nested {#expr:} parser |
Revision as of 00:29, 29 June 2011
−14,000.
![]() | This is the template sandbox page for Template:Hands/numdisp (diff). See also the companion subpage for test cases. |