summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw1936.pp
blob: 0ea8c612828954fdfe052196dc0c9294a69a73b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var
   X,Y,X1,Y1,X2,Y2,Style: byte;

begin
   X := 4;
   Y := 5;
   X1 := 3;
   X2 := 5;
   Y1 := 4;
   Y2 := 6;
   Style := 7;

   if ((Style=0) and (X in [X1..X2]) and (Y in [Y1..Y2]))
   or ((Style=6) and (X in [succ(X1)..pred(X2)]) and (Y in [Y1+3..pred(Y2)]))
   or ((Style <> 0) and (Style <> 6) and  (X in [succ(X1)..pred(X2)]) and (Y in [succ(Y1)..pred(Y2)]))
   then
   begin
      writeln ('OK');
   end
   else
   begin
     writeln('ERROR');
     halt(1);
   end;
end.