我需要找到DecimalSeparator var SysUtils Delphi 7,在Delphi XE6中我试图在System.SysUtils中找到,但没有成功。有人可以告诉我在Delphi XE6中哪里可以找到她吗?
在Delphi 7中,它位于SysUtils.pas单元的第618行:
var
CurrencyString: string;
CurrencyFormat: Byte;
NegCurrFormat: Byte;
ThousandSeparator: Char;
DecimalSeparator: Char;
我需要这个变量来将Delphi 7的一个组件转换为XE6
答案 0 :(得分:19)
我的不好,首先我需要调用FormatSettings,然后我可以在Delphi XE6的DecimalSeparator中使用,
FormatSettings.DecimalSeparator
答案 1 :(得分:7)
procedure ConfigureBrazilRegion;
var
FormatBr: TFormatSettings;
begin
// Create new setting and configure for the brazillian format
FormatBr := TFormatSettings.Create;
FormatBr.DecimalSeparator := ',';
FormatBr.ThousandSeparator := '.';
FormatBr.CurrencyDecimals := 2;
FormatBr.DateSeparator := '/';
FormatBr.ShortDateFormat := 'dd/mm/yyyy';
FormatBr.LongDateFormat := 'dd/mm/yyyy';
FormatBr.TimeSeparator := ':';
FormatBr.TimeAMString := 'AM';
FormatBr.TimePMString := 'PM';
FormatBr.ShortTimeFormat := 'hh:nn';
FormatBr.LongTimeFormat := 'hh:nn:ss';
FormatBr.CurrencyString := 'R$';
// Assign the App region settings to the newly created format
System.SysUtils.FormatSettings := WFormatBr;
end;