[DUG] Need help with trunc command delphi 6

Vikas... vikas.image at gmail.com
Wed Dec 30 20:00:53 NZDT 2009


Hello everyone,

I am facing one strange problem here. We are using a banking teller
application ,here we do calculation based on denominations in short.

My main problem is when we use this application for long time with out
closing it the trunc start giving incorrect value what i mean is

quantity := trunc(amount/value).

Sometime when amount = let say 4.5 and value =0.1 it gives like

quantity := trunc(4.5/0.1)=44 which is wrong since my client complain it
make them lose of 1 dollar amount.

However when i close the application and do again all works fine.

Anyone ever faced this problem before  , or anyone know any substitute for
trunc which works
I am using delhi6

Appreciate your help

regards
vik

-- 
 vikas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20091230/e63d4310/attachment.html 


More information about the Delphi mailing list