* SScanf uses StrToFloat to convert the string to a float so it has to use DecimalSeparator to parse the string

* test adapted to use DecimalSeparator to create the test string

git-svn-id: trunk@13399 -
This commit is contained in:
florian 2009-07-16 21:12:45 +00:00
parent 87df99a53d
commit ee49e8acb6
2 changed files with 2 additions and 2 deletions

View File

@ -2842,7 +2842,7 @@ function sscanf(const s: string; const fmt : string;const Pointers : array of Po
while (Length(s) > n) and (s[n] = ' ') do
inc(n);
while (Length(s) >= n) and
(s[n] in ['0'..'9', '+', '-', '.', 'e', 'E']) do
(s[n] in ['0'..'9', '+', '-', DecimalSeparator, 'e', 'E']) do
begin
s1 := s1+s[n];
inc(n);

View File

@ -7,7 +7,7 @@ var
s : string;
l : longint;
begin
sscanf('asdf 1.2345 1234','%s %f %d',[@s,@e,@l]);
sscanf('asdf 1'+DecimalSeparator+'2345 1234','%s %f %d',[@s,@e,@l]);
if (e<>1.2345) or
(l<>1234) or
(s<>'asdf') then