fork(1) download
  1. program ideone;
  2.  
  3. type
  4. Parent = Class
  5. procedure Print; virtual;
  6. end;
  7.  
  8. Child = Class(Parent)
  9. procedure Print; override;
  10. end;
  11.  
  12. procedure Parent.Print;
  13. begin
  14. writeln('Parent Print');
  15. end;
  16.  
  17. procedure Child.Print;
  18. begin
  19. writeln('Child Print');
  20. end;
  21.  
  22. var
  23. C: Child;
  24. P: ^Parent;
  25. begin
  26. C := Child.Create();
  27. P := @C;
  28. P.Print();
  29. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas(5,4) Error: Identifier not found "Class"
prog.pas(5,4) Error: Error in type definition
prog.pas(5,4) Fatal: Syntax error, ";" expected but "PROCEDURE" found
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
stdout
Standard output is empty