From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17369 invoked from network); 6 Apr 2004 13:00:15 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 6 Apr 2004 13:00:15 -0000 Received: (qmail 4099 invoked by alias); 6 Apr 2004 13:00:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19740 Received: (qmail 4084 invoked from network); 6 Apr 2004 13:00:07 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 6 Apr 2004 13:00:07 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 6 Apr 2004 13:0:7 -0000 Received: (qmail 6747 invoked from network); 6 Apr 2004 13:00:07 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 6 Apr 2004 13:00:03 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-20.tower-36.messagelabs.com!1081256375!5261141 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 23006 invoked from network); 6 Apr 2004 12:59:35 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-20.tower-36.messagelabs.com with SMTP; 6 Apr 2004 12:59:35 -0000 Received: from trentino.logica.co.uk ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id i36CxZMO025328 for ; Tue, 6 Apr 2004 13:59:35 +0100 Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 2C8C87969E8E for ; Tue, 6 Apr 2004 14:58:50 +0200 (CEST) X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <1040331155841.ZM29270@candle.brasslantern.com> From: Oliver Kiddle References: <15526.1080739251@trentino.logica.co.uk> <1040331155841.ZM29270@candle.brasslantern.com> To: Zsh workers Subject: Re: PATCH: subscript flags on lhs of assignment Date: Tue, 06 Apr 2004 14:58:50 +0200 Message-ID: <23659.1081256330@trentino.logica.co.uk> X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 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