From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9519 invoked from network); 11 Nov 1998 20:55:09 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 11 Nov 1998 20:55:09 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id PAA09890; Wed, 11 Nov 1998 15:54:27 -0500 (EST) Resent-Date: Wed, 11 Nov 1998 15:54:27 -0500 (EST) From: "Bart Schaefer" Message-Id: <981111125236.ZM3587@candle.brasslantern.com> Date: Wed, 11 Nov 1998 12:52:36 -0800 In-Reply-To: Comments: In reply to Timothy Writer "Re: PATCH: 3.1.5 - sample associative array implementation" (Nov 11, 3:00pm) References: <9811111358.AA51361@ibmth.df.unipi.it> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Timothy Writer , zsh-workers@math.gatech.edu Subject: Re: PATCH: 3.1.5 - sample associative array implementation MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"K4m5f.0.QQ2.3cVIs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4604 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Nov 11, 3:00pm, Timothy Writer wrote: } Subject: Re: PATCH: 3.1.5 - sample associative array implementation } } In ksh93 associative arrays are declared using "typeset -A". This could easily be mimicked. } They use the } same syntax as indexed arrays, e.g. "foo[bar]=baz"; the text within [] is } subject to variable expansion and whitespace counts. Hrm. Zsh currently can't handle whitespace inside the [ ]; and I'm not sure the paramtab implementation I did will work with keys that aren't parsable as "identifier". Otherwise this is good. How can you (or can you not) assign to multiple elements simultaneously? } The following special notation is used to get all keys: } } "${!arrayname[@]}" Exactly what about that is the special notation? The `!'? Does ksh93 recognize other special characters in that position? Is there any way to get both the keys and the values in a single expansion? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com