summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw11176.pp
blob: 6ff6bcfcf95270a26648f071196c5aef8a0a75d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
type
  Tx = (one,two,three);

procedure error(number : longint);
begin
  writeln('error ', number);
  halt(number);
end;

var
  a : Tx;
  err : word;

begin
  val('one', a, err);
  if (err <> 0) or (a <> one) then error(1);
end.