Template:Byte

From Wiki of ZZT
Revision as of 07:58, 18 January 2021 by Quantum (talk | contribs) (Template wrapper for Module:Byte)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Byte is a template for displaying a byte value (unsigned, as in Pascal) in both decimal and hexadecimal. Example:

   Tigers have element ID {{Byte|42}}.

Displays as:

Tigers have element ID 42 (0x2A).

The input can be either hex or decimal: in the case of hex, the "0x" prefix must be present.

Keep in mind that if you're talking about a color or an ASCII character, Template:ColorSwatch or Template:CharSwatch might be more appropriate, depending on what you want to do.