IntToHex converts a Integer into a hexadecimal value represented as a String.

This is used when you need to save into hexadecimal type fields within a database or file.

Declaration: Function IntToHex( v : int64; d : Integer) : string

The example is -

procedure OnMapEvent(var Value:Variant);
var
MyAmount : Integer
begin
MyAmount := 123;
Value := IntToHex(MyAmount,0);
end;