Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: subscript flags on lhs of assignment



On 31 Mar, Bart wrote:
> Nice.  You'll need to update the docs, of course; the INability to use
> a pair of patterns for associative arrays should have been explicitly
> mentioned before, and the stuff about assignments not working will have
> to move from the "r" section to the "R" section.

Okay, here's the doc change.

Oliver

Index: Doc/Zsh/params.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/params.yo,v
retrieving revision 1.20
diff -u -r1.20 params.yo
--- Doc/Zsh/params.yo	8 Mar 2004 16:57:41 -0000	1.20
+++ Doc/Zsh/params.yo	6 Apr 2004 12:41:33 -0000
@@ -198,14 +198,14 @@
 scalar and the `tt(w)' flag is given, respectively).  The subscript used
 is the number of the matching element, so that pairs of subscripts such as
 `tt($foo[(r))var(??)tt(,3])' and `tt($foo[(r))var(??)tt(,(r)f*])' are
-possible.  If the parameter is an associative array, only the value part
-of each pair is compared to the pattern, and the result is that value.
-Reverse subscripts may be used for assigning to ordinary array elements,
-but not for assigning to associative arrays.
+possible if the parameter is not an associative array.  If the
+parameter is an associative array, only the value part of each pair is
+compared to the pattern, and the result is that value.
 )
 item(tt(R))(
 Like `tt(r)', but gives the last match.  For associative arrays, gives
-all possible matches.
+all possible matches. May be used for assigning to ordinary array
+elements, but not for assigning to associative arrays.
 )
 item(tt(i))(
 Like `tt(r)', but gives the index of the match instead; this may not be
  



Messages sorted by: Reverse Date, Date, Thread, Author