Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2001-06

Format() trouble

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Aleksey V. Vaneev

Hello,

How can I avoid "standardised" Format()'s formatting under Win32? For example, if I use '%8.4f' in format string, it outputs '444,333' if my country is Russia, while DOS version outputs '444.333' (I guess it doesn't have country-specific information). Just wanted to know whether it is possible to "hardcode" some aspects of formatting or not. Thanks.

Best regards,
Aleksey

Reply by email

Michael Van Canneyt
to Aleksey V. Vaneev
Aleksey V. Vaneev wrote 8 lines
Hello, How can I avoid "standardised" Format()'s formatting under Win32? For example, if I use '%8.4f' in format string, it outputs '444,333' if my country is Russia, while DOS version outputs '444.333' (I guess it doesn't have country-specific information). Just wanted to know whether it is possible to "hardcode" some aspects of formatting or not. Thanks.

It is. Set the 'DecimalSeparator' string to ','.
All this is explained in the documentation of the SysUtils unit.

Michael.

Reply by email