Need Currency Val

BlitzPlus Forums/BlitzPlus Beginners Area/Need Currency Val

Zooker(Posted 2005) [#1]
I am re writing a check register program. Blitz does not have a currency function. Could I just use floats in place
of a currency function? Personal checks probably won't be made for more then a million(A wild guess) I intend to limit the decimal place to 2 places. Any ideas?


Grey Alien(Posted 2005) [#2]
Why not use integers to store the values in cents and just format them on-screen to display a decimal point. MAke a special function that you can pass and int that ouputs it with a $ on the front and a . in the middle? Just an idea.


WolRon(Posted 2005) [#3]
Never use floats with currency. You will eventually get rounding errors. As Grey Alien suggested, use integers. Sure, it's a bit more work, but your math will ALWAYS be correct.


Zooker(Posted 2005) [#4]
Thank You People!! Appreciate it!