MantisBT - Soldat Dedicated Server
View Issue Details
0000015Soldat Dedicated ServerScripting Corepublic2011-09-14 12:002012-06-10 18:21
JotEmI 
Falcon 
normalminoralways
closedfixed 
x86WindowsXP SP3
2.7.0 
2.7.4 
0000015: RoundTo() doesn't remove trailing zeros.
As you can see on attached screen RoundTo() doesn't remove trailing zeros. As far as I know it only happens on dedicated server running on Windows. On Linux trailing zeros are removed.
No tags attached.
related to 0000083resolved Falcon StrToInt() doesn't throw an exception 
png round.png (25,263) 2011-09-14 12:00
https://bugs.soldat.pl/file_download.php?file_id=254&type=bug
png
Issue History
2011-09-14 12:00JotEmINew Issue
2011-09-14 12:00JotEmIFile Added: round.png
2011-10-02 05:05FryerAssigned To => Fryer
2011-10-02 05:05FryerStatusnew => confirmed
2011-10-08 11:51tkNote Added: 0001199
2012-02-03 16:05ShoozzaAssigned ToFryer =>
2012-02-29 20:12FalconAssigned To => Falcon
2012-02-29 20:12FalconStatusconfirmed => assigned
2012-05-24 20:50FalconAssigned ToFalcon =>
2012-05-24 20:50FalconStatusassigned => confirmed
2012-05-24 20:50FalconRelationship addedrelated to 0000083
2012-06-10 18:21FalconNote Added: 0001551
2012-06-10 18:21FalconStatusconfirmed => closed
2012-06-10 18:21FalconAssigned To => Falcon
2012-06-10 18:21FalconResolutionopen => fixed
2012-06-10 18:21FalconFixed in Version => 2.7.4

Notes
(0001199)
tk   
2011-10-08 11:51   
It's obviously not RoundTo() which does it's job and zerofies specified decimal places. It's FloatToStr() which displays decimal places despite the fact that they are 0.

Example:
WriteLn(FloatToStr(1.0)) will display 1.0000000000000
(0001551)
Falcon   
2012-06-10 18:21   
As because trailing zeros are result of compiler change, I've added FormatFloat() function that can be used to display floats incely.
Full description here: http://www.freepascal.org/docs-html/rtl/sysutils/formatfloat.html [^]