HexToInteger (String function): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 24: | Line 24: | ||
string had an odd number of characters. | string had an odd number of characters. | ||
</dl> | </dl> | ||
==See also== | ==See also== | ||
{{Template:String:HexToInteger footer}} | {{Template:String:HexToInteger footer}} |
Revision as of 19:36, 25 November 2011
Convert a hexadecimal string to an integer (String class)
[Introduced in Sirius Mods 7.5]
HexToInteger is an intrinsic function that returns the integer value of a hex-encoded string.
Syntax
%number = string:HexToInteger[( [Signed= boolean])] Throws InvalidHexData
Syntax terms
%number | A numeric variable to receive the integer value of the method object string. |
---|---|
string | A hex-encoded string value that contains an even number of characters. |
Signed | This is an optional, but NameRequired, argument and is a boolean enumeration value that indicates whether the method object string is converted to a signed integer.
|
Exceptions
This intrinsic function can throw the following exceptions:
- InvalidHexData
- If the method object string does not contain a properly encoded hexadecimal value. The exception object indicates the position of the first invalid character in the method object string, or it indicates a zero if the method object string had an odd number of characters.