convert_fsize_to_standard_str Function

Unit
Unit5

Declaration
Function convert_fsize_to_standard_str(size_: Int64): String;

Implementation

function convert_fsize_to_standard_str(size_:Int64):String;
var size:Extended;
begin
if size_>=1000 then begin
   size:=size_ / 1000;
   if size >= 1000 then begin
      size :=size  / 1000;
         if size >=1000 then begin
            size :=size  / 1000;
            result:=FormatFloat('0.##',(size / 1000))+' GB';
         end else result:=FormatFloat('0.##',size)+' MB';
   end else result:= FormatFloat('0.##',size)+' KB';
end else result:= Inttostr(size_)+' bytes';
End;


HTML generated by Time2HELP
http://www.time2help.com