fpc/tests/test/units/sysutils/tsscanf.pp
florian ee49e8acb6 * 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 -
2009-07-16 21:12:45 +00:00

19 lines
287 B
ObjectPascal

{$mode objfpc}
{$h+}
uses
sysutils;
var
e : extended;
s : string;
l : longint;
begin
sscanf('asdf 1'+DecimalSeparator+'2345 1234','%s %f %d',[@s,@e,@l]);
if (e<>1.2345) or
(l<>1234) or
(s<>'asdf') then
halt(1);
// writeln(s,' ',e,' ',l);
writeln('ok');
end.