3 ms·
I'm not sure what's so difficult to understand about calling a function like parseInteger(userEnteredNumber, defaultLocale) on user input and then calling somet
by imtringued 11y ago
I'm not sure what's so difficult to understand about calling a function like parseInteger(userEnteredNumber, defaultLocale) on user input and then calling something like formatInteger(numberToBeOutputted, defaultLocate) on numbers that will be shown to the users. Programming languages already have a fixed representation for decimal numbers that will be used regardless of the user locale which is generally always with a dot for the decimal seperator and often there are no thousand seperators.
- ars 11y agoIt's more the confusion about seeing two kinds of numbers. If I see: 123,456 Is it a list of two numbers? Or a single number with a decimal?
- Symbiote 11y agoIn American, how do you know it's not 123 thousand etc?
- hawkice 11y agoThe are two ways to distinguish it being one number or two: (1) Context. This helps most of the time. Not the most helpful for computers, or CSV files. (2) Space. 123,456 is one number and 123, 456 are two. Again, not _strictly_ helpful for CSV files, which is why people use e.g. TSV.
- Symbiote 11y agoThen do the same if it's been written the European way... My point was the OP is making mountains out of molehills.