SysUtils.TFormatSettings

From RAD Studio VCL Reference
Jump to: navigation, search

Delphi Information

From SysUtils.pas

TFormatSettings = record
	CurrencyFormat: Byte;
	NegCurrFormat: Byte;
	ThousandSeparator: Char;
	DecimalSeparator: Char;
	CurrencyDecimals: Byte;
	DateSeparator: Char;
	TimeSeparator: Char;
	ListSeparator: Char;
	CurrencyString: string;
	ShortDateFormat: string;
	LongDateFormat: string;
	TimeAMString: string;
	TimePMString: string;
	ShortTimeFormat: string;
	LongTimeFormat: string;
	ShortMonthNames: :TFormatSettings.:1;
	LongMonthNames: :TFormatSettings.:2;
	ShortDayNames: :TFormatSettings.:3;
	LongDayNames: :TFormatSettings.:4;
	TwoDigitYearCenturyWindow: Word;
end;


Unit: SysUtils

Type: struct

C++ Information

From SysUtils.hpp

TFormatSettings = class


Unit: SysUtils

Type: class

Class Fields: SysUtils.TFormatSettings Fields

Class Types: SysUtils.TFormatSettings Types

Description

TFormatSettings defines a thread-safe string formatting context.


TFormatSettings defines a data structure containing locale information used by the string formatting routine. Each member of TFormatSettings is equivalent to the global variable with the same name. A variable of type TFormatSettings defines a thread-safe context that formatting functions can use in place of the default global context, which is not thread-safe.

To create and use the thread-safe environment defined by TFormatSettings, follow these steps:

  1. Define a variable of type TFormatSettings
  2. Call GetLocaleFormatSettings to populate the TFormatSettings variable with locale information.
  3. Pass the TFormatSettings variable as the last parameter of the string formatting routine.

Each routine that accepts a TFormatSettings parameter is thread-safe, and is an overload of an equivalent function that refers to the global formatting variables.

Personal tools
Translations
Newest Version