summaryrefslogtreecommitdiff
path: root/tests/tbs/tb0199.pp
blob: bf7e7e32c9eb6e5a305dc9e7e157f20a49c7b2ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ Old file: tbs0235.pp }
{ Val(cardinal) bugs                                    OK 0.99.11 (JM) }

program bug0233;

var s:string;
    w:cardinal;
    code:word;

begin
    s:='192';
    val(s,w,code);
    if code<>0 then
        begin
           writeln('Error');
           halt(1);
        end
    else
        writeln(w);
end.