summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/units/sysutils/tsscanf.pp
blob: a4e62826339ed529604dc0ad727fe62de74082f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{$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.