(notonline)-->
without js -- (else cffi namespaces error, classes not supported by pwa/p2js anyway)
requires ("1.0.2") -- (free up the temp used in the v.show() call)
class five nullable
private integer n = 3
function get_n()
return n
end function
procedure set_n(integer n)
this.n = n
end procedure
procedure show()
printf(1,"show: n is %d\n",{n})
end procedure
function five(integer n = 4)
printf(1,"constructor five(%d) called\n",n)
this.n = n
return this
end function
procedure ~five()
printf(1,"destructor ~five(%d) called\n",n)
end procedure
end class
five v = new({5})
assert(v.n=5)
v.n = 6
v.show()
v=NULL