Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - hexdec() convert hexa string to its numeric representation http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 hexdec()            Convert hexa string to its numeric representation
------------------------------------------------------------------------------
 Declaration
   math.hdr

 Syntax
   func ulong hexdec extern
   param const char cHexaString

 Arguments
   cHexaString is a hexadecimal string.

 Return
   The numeric value of the passed string.

 Description
   This function returns a ulong value which contains the equivalent to the
   passed hexadecimal string in cHexaString. This string can be formatted
   with a leading "0x", or may just contain hexadecimal digits.

 Example
   #define EXAMPLE_MATH
   #include example.hdr

   proc Test_hexdec
   ? hexdec( "0x0000FFFF" )   // Output: 65535
   ? hexdec( "0xFFFF" )       // Output: 65535
   ? hexdec( "0xffff" )       // Output: 65535
   ? hexdec( "ffff" )         // Output: 65535
   ? hexdec( "FFFF" )         // Output: 65535
   ? hexdec( "xyzs" )         // Output:     0
   endproc

   proc main
   Test_hexdec()
   endproc

See Also: dechex()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson