Description |
The TFormatSettings record is used to hold Windows locale global variable for use by thread-safe versions of a number of data conversion functions.
It must be furnished before invoking a function that uses it.
|
|
Related commands |
DateTimeToStr |
|
Converts TDateTime date and time values to a string |
Format |
|
Rich formatting of numbers and text into a string |
StrToDateTime |
|
Converts a date+time string into a TDateTime value |
|
|
|
Example code : Use of the format settings record |
var
formatSettings : TFormatSettings;
begin // Furnish the locale format settings record
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, formatSettings);
// And use it in the thread safe form of CurrToStrF
WriteLn('1234.56 formats as = '+
CurrToStrF(1234.56, ffCurrency, 4, formatSettings));
end;
|
Show full unit code |
1234.56 formats as ?1,234.5600
|
|