fpc/tests/webtbs/tw11176.pp
marco 046de405d1 * test for enum case, on Jonas' request
git-svn-id: trunk@10881 -
2008-05-04 18:31:33 +00:00

17 lines
228 B
ObjectPascal

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.