summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw7200.pp
blob: 0925bc59005a41084aa2924882f3ef11043cd1b5 (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
26
27
28
29
30
31
32
{$mode delphi}

var i : integer;

function GetInt : integer;
begin
 Result := 10;
end;


 var myfunc : function : integer;


begin

 myfunc := GetInt;

 //i := integer(myfunc) div 2; //works
 //i := myfunc; i := i div 2; //works
 i := myfunc div 2; //does not work
 if (i <> 5) then
   halt(1);

 i := myfunc shr 2;
 if i <> 2 then
   halt(2);

 i := not myfunc;
 if i <> not(integer(10)) then
   halt(3);

end.