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);
};
char *name;
};
-construct(Animal) (Animal self, str name)
+construct(Animal,Actions) (Animal self, str name)
{
self->name = name;
return self;
for_range(i, 0, 2)
{
- print(animal[i]->name, ":", _(talk,animal[i]));
+ print(animal[i]->name, ":", _(talk, animal[i]));
}
+
}