tlib1b.pp 540 B

123456789101112131415161718192021222324252627
  1. { %target=win32,win64 }
  2. { %needlibrary }
  3. { Checks that the two functions with the same exported name 'p'
  4. are each loaded correctly. }
  5. procedure p(var a : dword);external 'tlib1a' name 'p';
  6. procedure p2(var a : dword);external 'tlib1a2' name 'p';
  7. var
  8. a : dword;
  9. begin
  10. a:=0;
  11. p(a);
  12. if a <> 1 then
  13. halt(1);
  14. a:=0;
  15. p2(a);
  16. if a <> 2 then
  17. begin
  18. if a=1 then
  19. writeln('Error: Calling tlib1a library p function again instead ',
  20. 'of tlib1a2 p function.');
  21. halt(2);
  22. end;
  23. writeln('ok');
  24. end.