Difference between revisions of "Template:0000expr"

From blackwiki
Jump to navigation Jump to search
blackwiki>Dcoetzee
(Switch to using {{#invoke:BaseConvert|convert|n={{{1}}}|base=10|width=4}})
blackwiki>Dcoetzee
Line 1: Line 1:
<includeonly>{{#invoke:BaseConvert|convert|n={{{1}}}|base=10|width=4}}</includeonly><noinclude>{{documentation}}</noinclude>
+
<includeonly>{{#invoke:BaseConvert|convert|n={{#expr:{{{1}}}}}|base=10|width=4}}</includeonly><noinclude>{{documentation}}</noinclude>

Revision as of 20:23, 23 February 2013

Template documentation[view] [edit] [history] [purge]

Like Template:0expr but adds padding zeros to get the number up to 4 digits instead of 2. For example:

{{0000expr|15+2}}

produces:

0017