Difference between revisions of "Template:Hex2dec/doc"

From blackwiki
Jump to navigation Jump to search
imported>Toohool
(update to reflect Lua implementation)
imported>DePiep
Line 10: Line 10:
 
*<tt><nowiki>{{hex2dec|0xFFFFFFFF}}</nowiki> → {{hex2dec|0xFFFFFFFF}}</tt>
 
*<tt><nowiki>{{hex2dec|0xFFFFFFFF}}</nowiki> → {{hex2dec|0xFFFFFFFF}}</tt>
  
 +
;Input formats
 
The template also accepts lowercase and padded hexadecimals with or without the prefix "0x":
 
The template also accepts lowercase and padded hexadecimals with or without the prefix "0x":
 
*<tt><nowiki>{{hex2dec|0xa0}}</nowiki> → {{hex2dec|0xa0}}</tt>
 
*<tt><nowiki>{{hex2dec|0xa0}}</nowiki> → {{hex2dec|0xa0}}</tt>
Line 15: Line 16:
 
*<tt><nowiki>{{hex2dec|0x00A0}}</nowiki> → {{hex2dec|0x00A0}}</tt>
 
*<tt><nowiki>{{hex2dec|0x00A0}}</nowiki> → {{hex2dec|0x00A0}}</tt>
 
*<tt><nowiki>{{hex2dec|A0}}</nowiki> → {{hex2dec|A0}}</tt>
 
*<tt><nowiki>{{hex2dec|A0}}</nowiki> → {{hex2dec|A0}}</tt>
 +
 +
;Borders
 +
*<tt><nowiki>{{hex2dec|}}</nowiki> → {{hex2dec|}}</tt>
 +
*<tt><nowiki>{{hex2dec}}</nowiki> → {{hex2dec}}</tt>
  
 
=== See also ===
 
=== See also ===

Revision as of 13:58, 24 February 2013

Usage

  • {{hex2dec|0x0000}} → 0
  • {{hex2dec|0xA0}} → 160
  • {{hex2dec|0x7C0}} → 1984
  • {{hex2dec|0xFFFF}} → 65535
  • {{hex2dec|0x845FED}} → 8675309
  • {{hex2dec|0x75BCD15}} → 123456789
  • {{hex2dec|0xDEADBEEF}} → 3735928559
  • {{hex2dec|0xFFFFFFFF}} → 4294967295
Input formats

The template also accepts lowercase and padded hexadecimals with or without the prefix "0x":

  • {{hex2dec|0xa0}} → 160
  • {{hex2dec|a0}} → 160
  • {{hex2dec|0x00A0}} → 160
  • {{hex2dec|A0}} → 160
Borders
  • {{hex2dec|}} → 0
  • {{hex2dec}} → 0

See also