Re: Optimized verion of AddThousandSeparator



"Tommi Prami" <tommi.nospam.prami@xxxxxxxxxxxxxxxxxx> wrote in message
news:47fdc42d$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Have you read the documentation for FormatFloat() yet? It tells you how
to
indicate that you want thousand separators to appear in the output. As
for
the actual separator, the global ThousandsSeparator variable is used.
If
your system does not define any separator, then the VCL defaults to the
','
character.


Just What I suspected, so I can't use that.

Yes you can.
As for the decimal separator i do:
VAR
kDecimalSeparator : Char ; // keep
....

DecimalSeparator := '.' ; // in DK we normally use ','
something := ' Stardate: ' + FormatFloat('#.0',Now) ; // now it uses '.'
as decimal separator
DecimalSeparator := kDecimalSeparator ; // restore system settings.

You just have to do the same with the ThousandsSeparator as Remy
mentions.


--
Med venlig hilsen/Best regards
Stig Johansen



.