hi,

attached a patch for docs/imcc/syntax.pod

fixing:
* typo, changing eamples in examples
* added ", respectively" to description of binary/hex numbers
* added syntax description for slices:
<var> = <var> [ <key> ]
where <key> is one of:
<var> .. <var>
.. <var>
<var> ..

Also, I added references to 2 files to the slicing part. Please note that there is not a clear description of what slicing should do. (or I overlooked).
My guess is that
   $P0 = $P1[ 1 .. 3 ]
should return an array with values from $P1[1], $P1[2] and $P[3].

Any confirmations or error marking would be appreciated.

regards,
klaas-jan

Index: docs/imcc/syntax.pod
===================================================================
--- docs/imcc/syntax.pod	(revision 16922)
+++ docs/imcc/syntax.pod	(working copy)
@@ -128,7 +128,7 @@
 
 =item encoding:charset:"string constant"
 
-Like above with an extra encoding attached to the string. For eample:
+Like above with an extra encoding attached to the string. For example:
 
   set S0, utf8:unicode:"«"
 
@@ -137,7 +137,7 @@
 
 =item numeric constants
 
-B<0x> and B<0b> denote hex and binary constants.
+B<0x> and B<0b> denote hex and binary constants respectively.
 
 =back
 
@@ -435,6 +435,26 @@
 This generates either a keyed B<set> operation or B<substr var, var,
 var, 1> for string arguments and an integer key.
 
+=item <var> = <var> [ <key> ]
+
+where C<key> is:
+
+ <var1> .. <var2>
+
+returns a slice defined starting at C<var1> and ending at C<var2>.
+
+ .. <var2>
+
+returns a slice starting at the first element, and ending at C<var2>.
+
+ <var1> ..
+
+returns a slice starting at C<var1> to the end of the array.
+
+see src/pmc/slice.pmc
+and t/pmc/slice.t.
+
+
 =item <var> [ <var> ] = <var>
 
 A keyed B<set> operation or the assign B<substr> op with a length of

Reply via email to