Numeric data question

terry tg5027 at citlink.net
Wed Jul 24 16:31:11 EDT 2002


>>  Do any programming languages have a built in "money" type?
>> How is this problem solved in them? 

Hmmm, my question is getting answered - by the time it is, I will 
have found out how to properly ask it.

I've been programming in MS Access VB since V1, so I've come to 
accept that a variable that references data that's Access's 
Currency data type always gets calculated with properly - i.e. no 
floating point problems.  Clearly VB is using that data type 
information and resolving it internally.  But also, there is a 
declarable data type of Currency for other variables.  I believe 
that Cobol has one too.

You're example is what is not acceptable (to the accounting 
community) - although I did have to use that back in the 60s to 
write FORTRAN accounting programs and everyone just accepted 
being a little off.  I've also used routines that are based on 
strings and integers.  They all share the common trait of being 
ugly.

>> I imagine someone out there has written a money class already.
>> If not you will be doing a service to the community if you do 
>> it.
Alex gave me a source ... I wouldn't know where to start yet.

>> no comment on whether you are loonie or not.

Thanks, and thanks for your comments.

terry 




More information about the Python-list mailing list