Difference between revisions of "Template:Hex to pseudo-decimal"
Jump to navigation
Jump to search
Kevin Wang (talk | contribs) |
Kevin Wang (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude>{{#vardefine:i|0}}{{#vardefine:preslice|{{#while:<!-- | <onlyinclude>{{#vardefine:i|0}}{{#vardefine:preslice|{{#while:<!-- | ||
− | -->|{{#vardefineecho:s|{{#sub:{{{1|}}}|{{#var:i}}|1}}}}<!-- | + | -->|{{#vardefineecho:s|{{#sub:{{{1|}}}|{{#var:i}}|1}}}}{{#var:s}}<!-- |
-->|{{#ifeq:{{#var:s}}|a|10<!-- | -->|{{#ifeq:{{#var:s}}|a|10<!-- | ||
--><!---->|{{#ifeq:{{#var:s}}|b|11<!-- | --><!---->|{{#ifeq:{{#var:s}}|b|11<!-- | ||
Line 15: | Line 15: | ||
}}}}{{#sub:{{#var:preslice}}|0|{{#expr:{{#len:{{#var:preslice}}}}-1}}}}</onlyinclude> | }}}}{{#sub:{{#var:preslice}}|0|{{#expr:{{#len:{{#var:preslice}}}}-1}}}}</onlyinclude> | ||
Shortcut [[Template:Hex to dec]]. | Shortcut [[Template:Hex to dec]]. | ||
+ | Inverse [[Template:Pseudo-decimal to hex]]. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 39: | Line 40: | ||
</pre> | </pre> | ||
|{{Hex to pseudo-decimal|ffffff}} | |{{Hex to pseudo-decimal|ffffff}} | ||
+ | |- | ||
+ | |<pre> | ||
+ | {{Hex to pseudo-decimal|000000}} | ||
+ | </pre> | ||
+ | |{{Hex to pseudo-decimal|000000}} | ||
|} | |} |
Latest revision as of 16:46, 21 June 2022
Shortcut Template:Hex to dec. Inverse Template:Pseudo-decimal to hex.
Input | Output |
---|---|
{{Hex to pseudo-decimal|1345}} |
1.3.4.5 |
{{Hex to pseudo-decimal|13e5}} |
1.3.14.5 |
{{Hex to pseudo-decimal|dffg}} |
13.15.15.g |
{{Hex to pseudo-decimal|ffffff}} |
15.15.15.15.15.15 |
{{Hex to pseudo-decimal|000000}} |
0.0.0.0.0.0 |