Mistři v programování na #hovnokod

Delphi #628

function B2R(Bytes: Int64): string;
 const
  k: int64 = 1024;
begin
 if Bytes < k then result := IntToStr(Bytes) + 'B' else
 if Bytes < k*k then result := FloatToStr(Round(Bytes*10/k)/10) + 'K' else
 if Bytes < k*k*k then result := FloatToStr(Round(Bytes*10/(k*k))/10) + 'M' else
 if Bytes < k*k*k*k then result := FloatToStr(Round(Bytes*10/(k*k*k))/10) + 'G' else
 if Bytes < k*k*k*k*k then result := FloatToStr(Round(Bytes*10/(k*k*k*k))/10) + 'T' else
 result := IntToStr(Bytes);
end;

HovnoKod,