Make your own free website on
3.2.68. X2D(hexstring[,length])

Returns a whole number that is the decimal representation of
hexstring. If length is specified, then hexstring is interpreted
as a two’s complement hexadecimal number consisting of the number
rightmost hexadecimal numerals in hexstring. If hexstring is
shorter than number, it is padded to the left with <NUL>
characters (that is: ‘00’x).

If length is not specified, hexstring will always be interpreted
as an unsigned number. Else, it is interpreted as an signed
number, and the leftmost bit in hexstring decides the sign.

     X2D(‘03 24’)   –>   ‘792’
     X2D(‘0310’)         –>   ‘784’
     X2D(‘ffff’)         –>   ‘65535’
     X2D(‘ffff’, 5) –>   ‘65535’
     X2D(‘ffff’, 4) –>   ‘-1’
     X2D(‘ff80’, 3) –>   ‘-128’
     X2D(‘12345’, 3)     –>   ‘837’