Thanks,
Rosen Marinov
>Hi,
>How can I check and if necessary to change decimal separator
>in Windows ?
You may not. It's changed by the user using a control panel function.
When you need to change it temporarily in your delphi program use the
following line of code in the initialization of your first unit:
DecimalSeparator := ',';
If you mean in code (unchecked):
if SysUtils.DecimalSeparator = '.' then SysUtils.DecimalSeparator :=
',';
Bob
---
Sent using Virtual Access 5.01 - download your freeware copy now
http://www.atlantic-coast.com/downloads/vasetup.exe
--
Bill Todd (TeamB)
(Questions received via email cannot be answered.)
Rosen Marinov
"Bob Villiers" <bob_vi...@lineone.net> wrote in message
news:VA.0000005...@lineone.net...
Here is a recent post by Peter Below about DecimalSeparator:
http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=624223515
In one application I didn't do what Peter recommended --
I hardcoded some strings with decimal points. I used the following
to replace these decimal points with whatever the DecimalSeparator is:
// 4.00 becomes 4,00 if the DecimalSeparator is a ','
FUNCTION LocalizeFloatString(CONST s: STRING): STRING;
BEGIN
RESULT := s;
IF POS('.', RESULT) > 0
THEN RESULT[POS('.',RESULT)] := DecimalSeparator
END {LocalizeFloatString};
--
efg
Earl F. Glynn E-mail: Earl...@att.net
Overland Park, KS USA
efg's Computer Lab: http://www.efg2.com/Lab
Rosen Marinov
"Earl F. Glynn" <Earl...@att.net> wrote in message
news:8jd36u$i8...@bornews.borland.com...
Rosen Marinov wrote in message <3959bf49@dnews>...
>Thanks, but I want to change decimal separator for ALL Windows