Convert IntToHex
Function IntToHexadecimal ( n : integer ) : String ;
Const
hex
: Array[ 0..15 ] Of char
= ( '0' ,
'1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'A' , 'B' , 'C' , 'D' ,
'E' , 'F' ) ;
Begin
While n
<> 0 Do
Begin
result := hex[ 15 And n ] + result ; {=(n mod 15)}
n := n Shr 4 ;
End ;
End ;
Format('%x',[LongIntNumber]);
Example
:
Caption := IntToHexadecimal ( 1000 ) ;
Or
Caption := Format ( '%x' , [ 347692649435437508 ] ) ;