tb0314.pp 505 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. { this program shows a possible problem
  2. of name mangling in FPC (PM) }
  3. procedure test;
  4. function a : longint;
  5. begin
  6. a:=1;
  7. end;
  8. begin
  9. writeln('a = ',a);
  10. end;
  11. procedure test(b : byte);
  12. function a : longint;
  13. begin
  14. a:=2;
  15. end;
  16. begin
  17. writeln('b = ',b);
  18. writeln('a = ',a);
  19. end;
  20. type a = word;
  21. function test_(b : a) : longint;
  22. begin
  23. test_:=b;
  24. end;
  25. begin
  26. test(1);
  27. test;
  28. test(4);
  29. end.