Add overloaded functions TryStrToBCD, etc. which will use TFormatSettings as parameter in style of TryStrToFloat etc.
Original Reporter info from Mantis: lacak @lacak.sk
-
Reporter name: LacaK
Original Reporter info from Mantis: lacak @lacak.sk
- Reporter name: LacaK
Description:
Use standard way how used in others RTL procedures.
Then we can get rid of DecimalPoint global variable and depend only on DefaultFormatSettings or supplied FormatSettings
Steps to reproduce:
So it will look like this:
function TryStrToBCD ( const aValue : FmtBCDStringtype;
var BCD : tBCD ) : Boolean; overload;
function TryStrToBCD ( const aValue : FmtBCDStringtype;
var BCD : tBCD;
const FormatSettings: TFormatSettings ) : Boolean; overload;
...
function TryStrToBCD ( const aValue : FmtBCDStringtype;
var BCD : tBCD ) : Boolean;
begin
Result:=TryStrToBCD(aValue, BCD, DefaultFormatSettings);
end;
function TryStrToBCD ( const aValue : FmtBCDStringtype;
var BCD : tBCD;
const FormatSettings: TFormatSettings ) : Boolean;
...
Additional information:
Partially discussed also in http://bugs.freepascal.org/view.php?id=18388