Author: leo
Date: Thu Sep 28 01:39:18 2006
New Revision: 14781

Modified:
   trunk/docs/pdds/clip/pddXX_cstruct.pod

Log:
pddXX_cstruct - clarify a few items

Modified: trunk/docs/pdds/clip/pddXX_cstruct.pod
==============================================================================
--- trunk/docs/pdds/clip/pddXX_cstruct.pod      (original)
+++ trunk/docs/pdds/clip/pddXX_cstruct.pod      Thu Sep 28 01:39:18 2006
@@ -97,7 +97,7 @@
     char "b";
   DEF   
 
-The generalization of arbitrary attribute names would of course be
+The generalization of quoted attribute names would of course be
 possible too, but isn't likely needed.
 
 =head2 Syntax variant
@@ -139,13 +139,13 @@
   bar_cs = subclass 'CStruct', 'bar'
   addattribute(s) bar_cs, <<'DEF'
     double x;
-    foo foo;        # the foo class is already defined
-    foo *fptr;
+    foo cfoo;              # contained foo structure
+    foo *fptr;             # a pointer to a foo struct
   DEF   
   o = new 'bar'
-  setattribute o, 'x', 3.14
-  setattribute o, ['foo'; 'a'], 4711         # o.foo.a = 4711
-  setattribute o, ['fptr'; 'b'], 255
+  setattribute o, 'x', 3.14                   # C-ish equivalent:
+  setattribute o, ['cfoo'; 'a'], 4711         # o.foo.a = 4711
+  setattribute o, ['fptr'; 'b'], 255          # o.fptr->b = 255
 
 Attribute access is similar to current *ManagedStruct's hash syntax
 but with a syntax matching ParrotObjects.
@@ -158,6 +158,8 @@
     char b[100];
   DEF   
 
+Access to array elements automatically does bounds checking.
+
 =head2 Possible future extemsios
 
   cs = subclass 'CStruct', 'todo'

Reply via email to