Quote:
Originally Posted by Razor12911
example
sorry didn't also mention length
function MBToGB(MB : Integer): String;
begin
if Length(IntToStr(MB)) > 3 then
Result := Copy(IntToStr(MB), 0, Length(IntToStr(MB))-3) + '.' + Copy(IntToStr(MB), Length(IntToStr(MB))-2, 1) + ' GB'
else
Result := IntToStr(MB) + ' MB'
end;
how to use
Legend:
i = integer, a number to convert from MB to GB
MBToGB(i)
|
Can you verify what is wrong?
Setup.zip