Björn Hägglund wrote:
* Class definitions which may contain procedure definitions and
local-statements. Procedures such nested should be able to access the
attributes of the class. The only things allowed inside class
definitions are methods, attributes, features and properties. This
makes them more clumsy than they need to be.
But you can already do all sorts of silly things inside class
definitions! For example:
class A
attr
a: 3
c: class $ feat b:2 meth init skip end end
o
f: fun {$ X} X*X end
meth init
o := {New @c init}
{Inspect @o.b}
end
meth m(Z Y)
fun {F X} [EMAIL PROTECTED] end
in
Y = {F [EMAIL PROTECTED] Z}}
end
end
X
O = {New A init}
{O m(4 X)}
{Inspect X}
_________________________________________________________________________________
mozart-hackers mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-hackers