tw3780.pp 503 B

123456789101112131415161718192021222324
  1. { %KNOWNCOMPILEERROR=Test disabled because mode gpc is disabled. }
  2. {Test disabled because mode gpc is disabled.}
  3. { Source provided for Free Pascal Bug Report 3780 }
  4. { Submitted by "Adriaan van Os" on 20050313 }
  5. { email: [email protected] }
  6. {$mode gpc}
  7. program func;
  8. type tfun = function( x: real): real;
  9. function f( x: real): real;
  10. begin
  11. f:= x
  12. end;
  13. function fsum( fun: tfun; x1, x2: real): real;
  14. begin
  15. fsum:= fun( x1) + fun( x2)
  16. end;
  17. begin
  18. writeln( fsum( f, 1.0, 2.0))
  19. end.