Re: Rounding a float down with Delphi


[ Post Followup ] [ Delphi Forum -- by DelphiLand ]

Posted by Helmut on October 28, 2003
In Reply to: Rounding a float down posted by Joey on October 26, 2003

: I have a problem in Delphi. I have number say 1.5 and when i use the formatfloat('0',score) function it gives me 2! but i need 1 how do i do this? ty for any help in advance

Have a look at the Delphi function
"SetRoundMode" ( see online-help) and call it in this way "SetRoundMode(rmDown)". I think, this may help.
i had the same problem in converting a value to the upper value.





[ Delphi Forum ]
[ DelphiLand: free Delphi source code, tips, tutorials ]