Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A = class()
- function A:init()
- self.x = nil
- end
- function A:draw()
- gc:drawString(self.x, 0, 0, "top")
- end
- B = class()
- function B:init(a, x)
- a.x = x
- end
- a = A()
- b = B(a, 42)
- a:draw() -- this would print 42 on the screen
Add Comment
Please, Sign In to add comment