MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000015Soldat Dedicated ServerScripting Corepublic2011-09-14 12:002012-06-10 18:21
ReporterJotEmI 
Assigned ToFalcon 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSWindowsOS VersionXP SP3
Product Version2.7.0 
Target VersionFixed in Version2.7.4 
Summary0000015: RoundTo() doesn't remove trailing zeros.
DescriptionAs 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.
TagsNo tags attached.
Attached Filespng file icon round.png [^] (25,263 bytes) 2011-09-14 12:00

- Relationships
related to 0000083resolvedFalcon StrToInt() doesn't throw an exception 

-  Notes
(0001199)
tk (reporter)
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 (administrator)
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 [^]

- Issue History
Date Modified Username Field Change
2011-09-14 12:00 JotEmI New Issue
2011-09-14 12:00 JotEmI File Added: round.png
2011-10-02 05:05 Fryer Assigned To => Fryer
2011-10-02 05:05 Fryer Status new => confirmed
2011-10-08 11:51 tk Note Added: 0001199
2012-02-03 16:05 Shoozza Assigned To Fryer =>
2012-02-29 20:12 Falcon Assigned To => Falcon
2012-02-29 20:12 Falcon Status confirmed => assigned
2012-05-24 20:50 Falcon Assigned To Falcon =>
2012-05-24 20:50 Falcon Status assigned => confirmed
2012-05-24 20:50 Falcon Relationship added related to 0000083
2012-06-10 18:21 Falcon Note Added: 0001551
2012-06-10 18:21 Falcon Status confirmed => closed
2012-06-10 18:21 Falcon Assigned To => Falcon
2012-06-10 18:21 Falcon Resolution open => fixed
2012-06-10 18:21 Falcon Fixed in Version => 2.7.4


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker