Guest User

Untitled

a guest
Jul 17th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. // Code loading example
  2. void main()
  3. {
  4. // Compile our class to a program
  5. program tmp = compile_file("termout.pike");
  6. // Instantiate the containing class
  7. object T = tmp->Termout();
  8.  
  9. werror("T: %O %O\n", _typeof(T), indices(T));
  10.  
  11. T->printstuff("Hello");
  12. T->printerror("Hi error", 3);
  13.  
  14. // Functions kan be pointed to in a variable
  15. function p = write;
  16. p("Hello:");
  17. p = T->printerror;
  18. p("Hello", 17);
  19. }
Add Comment
Please, Sign In to add comment