summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unit2.pas8
1 files changed, 6 insertions, 2 deletions
diff --git a/unit2.pas b/unit2.pas
index edd6b70..eb2f2b6 100644
--- a/unit2.pas
+++ b/unit2.pas
@@ -959,8 +959,12 @@ begin
exit;
end;
result:=floattostr(x*f);
- if length(result)-pos(decimalSeparator,result+decimalSeparator)>3 then
- delete(result,pos(decimalSeparator,result+decimalSeparator)+4,length(result));
+ if pos('E',result+'E')-pos(decimalSeparator,result+decimalSeparator)>3 then
+ delete(
+ result,
+ pos(decimalSeparator,result+decimalSeparator)+4,
+ pos('E',result+'E')-
+ pos(decimalSeparator,result+decimalSeparator)-4);
result:=result+' ';
end;