tlib3d.pp 681 B

12345678910111213141516171819202122232425262728293031
  1. { %target=win32,win64 }
  2. { %needlibrary }
  3. { %opt=-vw -Sew }
  4. { %neededafter }
  5. { On targets that support dll overloading, no
  6. warning should be generated, and the resulting code sholud work correctly. }
  7. program tlib3b;
  8. procedure p_proc(var a : dword); external 'tlib3a' name 'p';
  9. function p(a1, a2, a3, a4, a5, a6, a7 : dword) : dword; external 'tlib3b' name 'p';
  10. var
  11. a : dword;
  12. begin
  13. a:=0;
  14. p_proc(a);
  15. if a<>1 then
  16. begin
  17. Writeln('Error calling tlib3a p procedure');
  18. halt(1);
  19. end;
  20. a:=p(0,1,0,1,0,10,0);
  21. if a<>12 then
  22. begin
  23. Writeln('Error calling tlib3b p function');
  24. halt(1);
  25. end;
  26. Writeln('Everything works OK');
  27. end.