"this" or "self" style keyword??
Hi, sorry if I'm missing it. Is there a this/self style keyword for OO programming in classes? Thanks, Quinton
q.h.r.h. wrote:
sorry if I'm missing it. Is there a this/self style keyword for OO programming in classes?
If you want to access a member function or member data you can do I directly like this: class test { int a; // this is part of init set_a(2); // this should print "2" <<<a>>>; fun void set_a(int new_a){ new_a => a; } } test T; If that's not what you're looking for, maybe you could elaborate a bit... -- peace, love & harmony Atte http://www.atte.dk | quartet: http://www.anagrammer.dk http://www.atte.dk/gps | compositions: http://www.atte.dk/compositions
Hi!
sorry if I'm missing it. Is there a this/self style keyword for OO programming in classes?
There is 'this' keyword for refering to the object instance from inside a member function. There is also 'me' keyword which refers to the shred you are in, for example: me.yield(); // yields the VM - doesn't not advance time // unrelated to 'this' Best, Ge!
participants (3)
-
Atte André Jensen
-
Ge Wang
-
q.h.r.h.