fork download
  1. type
  2. users_t = (tarasB := 0, superhackkiller1997, other_shit);
  3. say_ptr_t = procedure (const s : string);
  4.  
  5. var
  6. users : array of string = ('tarasB', 'superhackkiller1997', 'other_shit');
  7.  
  8. function bind(usr: users_t) : say_ptr_t;
  9. begin
  10. end;
  11.  
  12. {say_ptr_t bind(users_t usr) {
  13.   void say(char * str) {
  14.   fprintf(stderr, "%s: %s\n", users[usr], str);
  15.   }
  16. say_ptr_t volatile p = say;
  17. return p;
  18. }}
  19.  
  20. begin
  21. bind(tarasB)('is god');
  22. bind(superhackkiller1997)('shit');
  23. bind(other_shit)('ko-ko-ko');
  24. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas(6,5) Fatal: Syntax error, "NIL" expected but "(" 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