In PDD 15 it says

Creating a new class with attributes

Adding the attributes a and b to the new class Foo:

  newclass $P0, "Foo"
  addattribute $P0, "a", "Foo::a" # This is offset 0
  addattribute $P0, "b", "Foo::b" # This is offset 1


maybe I'm just being a numpty but should this not be



Creating a new class with attributes


Adding the attributes a and b to the new class Foo:

  newclass $P0, "Foo"
  addattribute $P0, "a"  # "Foo::a" This is offset 0
  addattribute $P0, "b"  # "Foo::b" This is offset 1


I tried it the other way but could not add attributes to objects but I can do.


newclass $P0, "Foo"
  addattribute $P0, "a"


If this is the case there is a patch for pdd15 attached.


Harry
--- pdd15_objects.pod	2004-03-26 21:57:16.000000000 +0000
+++ pdd15_objects_new.pod	2004-03-27 22:10:50.000000000 +0000
@@ -441,8 +441,8 @@
 Adding the attributes C<a> and C<b> to the new class C<Foo>:
 
   newclass $P0, "Foo"
-  addattribute $P0, "a", "Foo::a" # This is offset 0
-  addattribute $P0, "b", "Foo::b" # This is offset 1
+  addattribute $P0, "a" # "Foo::a" This is offset 0
+  addattribute $P0, "b" # "Foo::b" This is offset 1
 
 =head2 Instantiating an object
 

Reply via email to