Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. const
  2. KFactor = 1024;
  3.  
  4. function SizeBytesToMB(Value: Extended; MbLabl: String; Offset: Integer): String;
  5. begin
  6. MbLabl := Trim(MbLabl);
  7. if MbLabl <> '' then
  8. MbLabl := ' ' + MbLabl;
  9. Result := FloatToStr(Value / (KFactor * KFactor));
  10. if Offset = 0 then
  11. Result := Copy(Result, 0, Pos('.', Result) - 1) + MbLabl
  12. else
  13. Result := Copy(Result, 0, Pos('.', Result) + Offset) + MbLabl;
  14. end;
  15.  
  16. Caption:=ExpandConstant('{cm:needsize1} '+SizeBytesToMB({#SizeAfterWorkInBytes}, '', 0));+' {cm:needsize2}');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement