in reply to Numbers with commas
The point with parsing a (maybe user input) string is that there is no correct way to handle commas and dots if yuou don't take you LOCALE into consideration. The string 2,500 written by an american is two thousand five hundred, by an italian is two and a half. And such numbers can be rather ambiguous, both in reading and in input. The standard computer notation uses only the dot for the decimal part and no commas and it's in most cases unambiguous. In all other cases you'll have to rely on the locale, and you should not expect a language to do it by itself (Java does if you don't tell it; but then, how do you know which version of the system was installed on the Linux box of your Hungarian branch?)
|
|---|