All pastes #984709 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-14 14:30 UTC
rendered paste body
rd7:/tmp bertrand$ cat /tmp/my_class.pmod 
class my_class
{
string message;
void create(string m) {
  message = m;
}
void action(int id) {
  write(message + id + "\n");
}
}
rd7:/tmp bertrand$ pike -M /tmp/
Pike v7.6 release 112 running Hilfe v3.5 (Incremental Pike Frontend)
> object c = my_class.my_class("hello");
> c->action(123);
hello123
(1) Result: 0