7 lines
118 B
ChaiScript
7 lines
118 B
ChaiScript
attr bob::z
|
|
def bob::bob() { this.z = 10 }
|
|
auto x = bob()
|
|
def bob::fred(x) { this.z - x }
|
|
|
|
assert_equal(7, x.fred(3))
|