Difference between revisions of "Template:Data value"

From TerraFirmaCraft Wiki
Jump to: navigation, search
m (1 revision: MinecraftWiki)
 
 
Line 1: Line 1:
 
<includeonly>{{#if: {{{2|}}}|'''{{{2|}}}'''<br />}}<sub>dec:</sub> {{#if: {{{1|}}} | {{#explode: {{{1}}} | : | 0 }} | ??}}{{#if: {{{p|}}}{{#pos: {{{1}}} | : }}|<sup>{{#if: {{{p|}}} | {{{p}}} | {{#explode: {{{1}}} | : | 1 }} }}</sup>}} <sub>hex:</sub> {{#if: {{{1|}}}|{{Decimal to hexadecimal converter|{{#explode: {{{1}}} | : | 0 }} | {{{1}}} }} |??}}{{#if: {{{p|}}}{{#pos: {{{1}}} | : }}|<sup>{{#if: {{{p|}}} | {{{p}}} | {{#explode: {{{1}}} | : | 1 }} }}</sup>}}{{#if: {{{2|}}}|<br />}}</includeonly><noinclude>
 
<includeonly>{{#if: {{{2|}}}|'''{{{2|}}}'''<br />}}<sub>dec:</sub> {{#if: {{{1|}}} | {{#explode: {{{1}}} | : | 0 }} | ??}}{{#if: {{{p|}}}{{#pos: {{{1}}} | : }}|<sup>{{#if: {{{p|}}} | {{{p}}} | {{#explode: {{{1}}} | : | 1 }} }}</sup>}} <sub>hex:</sub> {{#if: {{{1|}}}|{{Decimal to hexadecimal converter|{{#explode: {{{1}}} | : | 0 }} | {{{1}}} }} |??}}{{#if: {{{p|}}}{{#pos: {{{1}}} | : }}|<sup>{{#if: {{{p|}}} | {{{p}}} | {{#explode: {{{1}}} | : | 1 }} }}</sup>}}{{#if: {{{2|}}}|<br />}}</includeonly><noinclude>
{{/doc}}
+
{{doc}}
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 23:02, 16 May 2014

Template documentation (for the above template, sometimes hidden or invisible)

This template is used to show a data value in decimal and hexadecimal. Values are input as a decimal value, and the template will automatically convert it to hexadecimal.

Usage

{{dv|69}}

dec: 69 hex: 45


{{dv|69|optional label}}

optional label
dec: 69 hex: 45


{{dv|69:5}} or {{dv|69|p=5}}

dec: 695 hex: 455


Visit Template:Data value/doc to edit this text! (How does this work?)