summaryrefslogtreecommitdiff
path: root/tests/tbs/tb0314.pp
blob: a9cd582ecd3c6287e01f5ed299a3345160abbda7 (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
33
34
35
36
37
38

{ this program shows a possible problem
  of name mangling in FPC  (PM) }
  procedure test;

    function a : longint;
      begin
         a:=1;
      end;

    begin
       writeln('a = ',a);
    end;

  procedure test(b : byte);

    function a : longint;
      begin
         a:=2;
      end;

    begin
       writeln('b = ',b);
       writeln('a = ',a);
    end;

  type a = word;

  function test_(b : a) : longint;
    begin
      test_:=b;
    end;

begin
   test(1);
   test;
   test(4);
end.