HexToInteger (String function): Difference between revisions
Jump to navigation
Jump to search
m (→Usage notes) |
m (→Usage notes) |
||
Line 11: | Line 11: | ||
<tr><th>string</th> | <tr><th>string</th> | ||
<td>A hex-encoded string value that contains an even number of characters.</td></tr> | <td>A hex-encoded string value that contains an even number of characters.</td></tr> | ||
<tr><th>Signed</th> | <tr><th><var>Signed</var></th> | ||
<td>This is an optional, but <var>[[Methods#Named parameters|NameRequired]]</var>, argument and is a <var>[[boolean enumeration]]</var> value that indicates whether the method object string is converted to a signed integer.<ul><li><var class="term">Signed</var> defaults to <code>False</code>, which produces an unsigned conversion.<li>If <code>Signed=True</code>, the method object <var class="term">string</var> is treated as if it were preceded by a negative sign, a two's complement conversion is performed, and the returned value is preceded by a negative sign.</ul></td></tr> | <td>This is an optional, but <var>[[Methods#Named parameters|NameRequired]]</var>, argument and is a <var>[[boolean enumeration]]</var> value that indicates whether the method object string is converted to a signed integer.<ul><li><var class="term">Signed</var> defaults to <code>False</code>, which produces an unsigned conversion.<li>If <code>Signed=True</code>, the method object <var class="term">string</var> is treated as if it were preceded by a negative sign, a two's complement conversion is performed, and the returned value is preceded by a negative sign.</ul></td></tr> | ||
</table> | </table> |
Revision as of 00:21, 13 April 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.
|
Usage Notes
- HexToInteger is available as of "Sirius Mods" version 7.5.