Jump to content

Template:Dec2hex/doc: Difference between revisions

From SeptemWiki
Created page with "This template provides easy conversion of a decimal number to a hexadecimal number. === Usage === Works for all values in the range 0–4294967295. * <tt><nowiki>{{dec2hex|0..."
 
Line 12: Line 12:
* <tt><nowiki>{{dec2hex|3735928559}}</nowiki> → {{dec2hex|3735928559}}</tt>
* <tt><nowiki>{{dec2hex|3735928559}}</nowiki> → {{dec2hex|3735928559}}</tt>
* <tt><nowiki>{{dec2hex|4294967295}}</nowiki> → {{dec2hex|4294967295}}</tt>
* <tt><nowiki>{{dec2hex|4294967295}}</nowiki> → {{dec2hex|4294967295}}</tt>
* <tt><nowiki>{{dec2hex|429496729595}}</nowiki> → {{dec2hex|429496729595}}</tt>


;digits
;digits

Revision as of 19:33, 27 March 2016

This template provides easy conversion of a decimal number to a hexadecimal number.

Usage

Works for all values in the range 0–4294967295.

  • {{dec2hex|0}} → Script error: No such module "BaseConvert".
  • {{dec2hex|160}} → Script error: No such module "BaseConvert".
  • {{dec2hex|1984}} → Script error: No such module "BaseConvert".
  • {{dec2hex|65535}} → Script error: No such module "BaseConvert".
  • {{dec2hex|8675309}} → Script error: No such module "BaseConvert".
  • {{dec2hex|123456789}} → Script error: No such module "BaseConvert".
  • {{dec2hex|3735928559}} → Script error: No such module "BaseConvert".
  • {{dec2hex|4294967295}} → Script error: No such module "BaseConvert".
  • {{dec2hex|429496729595}} → Script error: No such module "BaseConvert".
digits
Specify how many digits are shown [2,8]. Example: {{dec2hex|65535|digits=8}} → Script error: No such module "BaseConvert".
x
Include the option x to display the number with a 0x.
  • {{dec2hex|160}} → Script error: No such module "BaseConvert".
  • {{dec2hex|160|x}} → 0xScript error: No such module "BaseConvert".