Jump to content

Template:Dec2hex/doc: Difference between revisions

From SeptemWiki
No edit summary
 
Line 14: Line 14:


;digits
;digits
: Specify how many digits are shown [2,8].  Example: <tt><nowiki>{{dec2hex|65535|digits=8}}</nowiki> → {{dec2hex|65535|digits=8}}</tt>
: Specify a minimum number of digits to show.  Example: <tt><nowiki>{{dec2hex|65535|digits=8}}</nowiki> → {{dec2hex|65535|digits=8}}</tt>


;x
;x

Latest revision as of 19:37, 27 March 2016

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

Usage

  • {{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 a minimum number of digits to show. 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".