[Tutor] integers and float
MIG
max_ig@yahoo.com
Fri, 19 Jul 2002 09:14:46 -0700 (PDT)
I've got a question with float and $.
I wrote a code for a Point-Of-Sales using floating variables for
dollars instead of integers using cents.
When I had problems printing the values I used the following line:
str(float(int((Variable_for_money)*100)/100)
I haven't found any problem yet testing the program, but since people
will pay their bills based on the program, I'm afraid some proble can
arise.
Please let me know if I can keep working with this or should I fix it
(with a lot of work because the program interacts with a MySQL data
base for accounting prupouses).
Thanks,
Max
__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com