HI
I'M TRYING TO FIND OUT WHICH KIND OF DECIMAL SEPARATOR IS IN USE IN HOLLAND
IS IT COMMON TO USE 20'OOO INSTEAD OF 20,000 OR 20.000 OR IN ANOTHER EUROPEAN COUNTRY?
MANY THANKS
LIORA
decimal separators
- Kaeru Gaman
- Addict

- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
in germany, we use the point as thousands separator and the comma as decimal separator.
the apostroph would easier be understood as thousand separator than the comma.
after reading the Wiki article, I would second the recommendation of IUPAC:
the apostroph would easier be understood as thousand separator than the comma.
after reading the Wiki article, I would second the recommendation of IUPAC:
"For numbers with many digits, the digits may be separated in groups of three, counting from the decimal sign toward the left and the right. The groups should be separated by a thin space (half space), and never by a comma or a point, or by any other means."
oh... and have a nice day.
Re: decimal separators
NEVER hard-code a decimal separator into your app. Get it from the PC's
locale settings, like so:
Disclaimer #1: This works on Windows only.
Disclaimer #2: I'm not sure if more than 1 character is used for a separator.
If it is, then add some more spaces to the string and change "1" to that many
spaces.
locale settings, like so:
Code: Select all
decsep$=" "
GetLocaleInfo_(#LOCALE_USER_DEFAULT,#LOCALE_SDECIMAL,decsep$,1)
Debug decsep$
Disclaimer #2: I'm not sure if more than 1 character is used for a separator.
If it is, then add some more spaces to the string and change "1" to that many
spaces.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Although the OFFICIAL (hey, that's a word in ALLCAPS) way to write it in dutch is comma's for the decimal points, many dutch have converted to the english way, using dots.
Oh, the bad things computers do to us.
Oh, the bad things computers do to us.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )

