tb0184.pp 468 B

12345678910111213141516171819202122
  1. { Old file: tbs0217.pp }
  2. { in tp mode can't use the procvar in writeln OK 0.99.11 (PFV) }
  3. {$ifdef fpc}{$mode tp}{$endif}
  4. type tmpproc=function:longint;
  5. function a:longint;{$ifndef fpc}far;{$endif}
  6. begin
  7. a:=-1;
  8. end;
  9. procedure tmp(aa: tmpproc);
  10. begin
  11. writeln(aa); { "Cannot read/write variables of this type", TP kan dit
  12. wel? }
  13. if aa<>-1 then halt(1);
  14. end;
  15. begin
  16. tmp(a); { de TP manier , in FPC moet dit zijn tmp(@a); }
  17. end.