The IntToStr function converts a Integer into a String data type. This is commonly used when you need to build a String, and concatenate (or join the value) an Integer value.

Declaration: Function IntToStr( Value : Extended) : string

An example of its use follows.

procedure OnMapEvent(var Value:Variant);
var
MyAmount : integer;
begin
MyAmount := 123;
//Value will be equal to '123'
Value := IntToStr(MyAmount);
end;

This function will only work with an Integer that is equal or less than 999,999,999. For larger values, use the function Int64ToStr, or define the variable MyAmount as an Int64 data type - please refer to Integer (Integer, Cardinal, Int64) for information.