Global decimal mark use

74 Views Asked by At

Is it feasible that one convention will be decided on with regard to the use of a decimal comma or decimal point and similarly, thousand separators? i.e. 1.000 vs 1,000

2

There are 2 best solutions below

2
On

ISO 31-0 says either "," or "." can be used as the decimal sign. Neither of these, just a space, should be used for grouping digits in threes. You'll probably get the world to agree on the choice of "," or "." right after they make one language standard. Not going to happen soon.

0
On

I use a thin space to separate triples of digits. Whether or not it's blessed by a standards committee, the meaning is clear.

This still leaves the question of what symbol to put after the units digit.

In C++, if you specify a LOCALE for an output stream, then appropriate digit separators are automatically added inside output numbers.