Of course there are easier ways to do the same thing... :-)
(G)2008 xChas */
-def_type(Animal);
-
-def_mem(Actions)
+def_interface(Animal,Actions)
{
str method(talk) (Animal self);
};
def_obj(Animal)
{
interface(Actions);
- char *name;
+ str name;
};
construct(Animal,Actions) (Animal self, str name)
for_range(i, 0, 2)
{
- print(animal[i]->name, ":", _(talk,animal[i]));
+ print(animal[i]->name, ":", _(talk, animal[i]));
}
+
}