summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw0797b.pp
blob: dcafaa6396de3b2a55b387357cb11fd2f953b8ef (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
program test;
{$INLINE ON}

var
  s2 : string;
  j : longint;

  procedure Tst(s: ShortString;var j : longint); inline;
  var
    i : longint;
  begin
    s:=s + ' Yes';
    i:=5;
    j:=j+i;
    WriteLn(s);
    s2:=s;
  end;
begin
   s2:='Before inline';
   j:=5;
   Tst('Hello Hello Hello',j);
   if (s2<>'Hello Hello Hello Yes') or (j<>10) then
     begin
       if (s2<>'Hello Hello Hello Yes') then
         writeln('s2 = ',s2);
       if (j<>10) then
         writeln('j = ',s2);
       halt(1);
     end;
end.