View Single Post
  #958  
Old 31-10-2014, 21:26
minh_k43sj minh_k43sj is offline
Registered User
 
Join Date: Oct 2014
Location: ho chi minh
Posts: 23
Thanks: 14
Thanked 1 Time in 1 Post
minh_k43sj is on a distinguished road
Quote:
Originally Posted by Dante1995 View Post
just remove the round to get the decimal




Code:

Function NumToStr(Float: Extended): String;
Begin
  Result:= Format('%.3n', [Float]); StringChange(Result, ',', '.');
  while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
  SetLength(Result, Length(Result));
End;

Function MbOrTb(Byte: Extended): String;
begin
if Byte < 1024 then Result:= NumToStr(Byte) + ' MB' else
  if Byte/1024 < 1024 then Result:= NumToStr((Byte/1024*100)/100) + ' GB' else
     Result:= NumToStr(((Byte/(1024*1024))*100)/100) + ' TB'
end;
18600 mb = 18.164 gb
OK, great.

and how to hide button "Back" at second windows setup"

sorry if i ask you too much (google translate, sorry my english)


Last edited by minh_k43sj; 31-10-2014 at 21:47.
Reply With Quote