Showing posts with label delphi - conversions. Show all posts
Showing posts with label delphi - conversions. Show all posts

Wednesday, November 29, 2017

DELPHI - How convert number to string

1) For conversion integer value to string:
var
  sValue : string;
begin
  sValue = IntToStr( 32 );
end;

2) For conversion float value to string. Last parameter is decimal point count.
FloatToStrF( FLocalData.PrepareTime / 1000, ffFixed, 15, 2 ) 

DELPHI - How format float value to string

EFreeMemory.Text := FormatFloat( '########,### KB', ms.dwAvailPhys / 1024 );