"HexInteger" (Interpreter Type)
"HexInteger" (Interpreter Type)
Hexadecimal number in a standard format.
Details
- "HexInteger" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "HexInteger" does not require connectivity to the Wolfram Cloud.
Restriction Specifications
-
Restricted["HexInteger",{{choices1,…}}] one among choices Restricted["HexInteger",max] a number below max Restricted["HexInteger",{min,max}] a number between min and max Restricted["HexInteger",{min,max,s}] a number between min and max, with step s
Options
- The following option can be used:
-
NumberSigns {"-",""} strings to use for signs of negative and positive numbers
Interpretation
- "HexInteger" yields an Integer.
Examples
Basic Examples (3)
Interpret hexadecimal numbers:
Interpreter["HexInteger"]["ff42ca"]Interpreter["HexInteger"]["00FF"]Interpret hexadecimal numbers with a bound:
Interpreter[Restricted["HexInteger", 1000]]["4ff"]Interpreter["HexInteger", NumberSigns -> {"minus ", "plus "}]["minus 45e64"]See Also
Interpreter Restricted Failure Integer
Interpreter Types: Integer Number Digit SemanticInteger ComputedInteger SemanticNumber ComputedNumber
Related Guides
History
Introduced in 2014 (10.0)