some work
[svn/Cll1h/.git] / demos / objects / objects-wiki.c
index f60351411f6ce528d41286ca3691c535b75ceb98..08403cb91af186a2a8830537b0a509af8217d5c2 100644 (file)
@@ -6,9 +6,7 @@
    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);
 };
@@ -16,10 +14,10 @@ def_mem(Actions)
 def_obj(Animal)
 {
  interface(Actions);
char *name;
str name;
 };
 
-construct(Animal) (Animal self, str name)
+construct(Animal,Actions) (Animal self, str name)
 {
  self->name = name;
  return self;
@@ -70,6 +68,7 @@ program
 
  for_range(i, 0, 2)
  {
-  print(animal[i]->name, ":", _(talk,animal[i]));
+  print(animal[i]->name, ":", _(talk, animal[i]));
  }
+
 }
This page took 0.106694 seconds and 4 git commands to generate.