HexToInteger (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 7: Line 7:
{{Template:String:HexToInteger syntax}}
{{Template:String:HexToInteger syntax}}
===Syntax terms===
===Syntax terms===
<dl>                                                                                                
<table class="syntaxTable">
<dt>%num                                                                                               
<tr><th>%num                                                                                              </th>
<dd>A numeric variable to receive the integer value of the method object string.  
<td>A numeric variable to receive the integer value of the method object string. </td></tr>
<dt>string                                                                                             
<tr><th>string                                                                                            </th>
<dd>A hex-encoded string value that contains an even number of characters.                             
<td>A hex-encoded string value that contains an even number of characters.                            </td></tr>
<dt>Signed=bool                                                                                       
<tr><th>Signed=bool                                                                                      </th>
<dd>This name-required argument (''''Signed'''') is a [[Boolean]] value that indicates whether the method object string is converted  
<td>This name-required argument (''''Signed'''') is a [[Boolean]] value that indicates whether the method object string is converted to a signed integer. If ''''True'''', the method object 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.                                                                                                      Signed is an optional argument that defaults to ''''False'''', which                                  produces an unsigned conversion.</td></tr>
to a signed integer. If ''''True'''', the method object is treated as if it were preceded by a negative sign,           
</table>
a two's complement conversion is performed, and the returned value is preceded by a negative sign.  
                                                                                                        
Signed is an optional argument that defaults to ''''False'''', which                                   
produces an unsigned conversion.                                                                    
                                                                                                     
</dl>


===See also===                                                                                         
===See also===                                                                                         

Revision as of 05:39, 19 January 2011

Convert a hexadecimal string to an integer (String class)

[Introduced in Sirius Mods 7.5]


This intrinsic function returns the integer value of a hex-encoded string.

HexToInteger is available as of version 7.5 of the Sirius Mods.

Syntax

%number = string:HexToInteger[( [Signed= boolean])] Throws InvalidHexData

Syntax terms

%num 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=bool This name-required argument ('Signed') is a Boolean value that indicates whether the method object string is converted to a signed integer. If 'True', the method object 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. Signed is an optional argument that defaults to 'False', which produces an unsigned conversion.

See also

List of intrinsic String methods