From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6339 invoked from network); 14 Nov 1998 06:44:51 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 14 Nov 1998 06:44:51 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id BAA04999; Sat, 14 Nov 1998 01:44:36 -0500 (EST) Resent-Date: Sat, 14 Nov 1998 01:44:36 -0500 (EST) From: "Bart Schaefer" Message-Id: <981113224137.ZM20181@candle.brasslantern.com> Date: Fri, 13 Nov 1998 22:41:37 -0800 In-Reply-To: Comments: In reply to Timothy Writer "Re: PATCH: 3.1.5 - sample associative array implementation" (Nov 13, 8:55pm) References: <9811111358.AA51361@ibmth.df.unipi.it> <981111125236.ZM3587@candle.brasslantern.com> <981112012358.ZM9722@candle.brasslantern.com> <981112173201.ZM13829@candle.brasslantern.com> 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: <"-Gu_w1.0.2E1.KRIJs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4630 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Nov 13, 8:55pm, Timothy Writer wrote: } Subject: Re: PATCH: 3.1.5 - sample associative array implementation } } In ksh93, $arrayname is a synonym for ${arrayname[0]}. This appears to be } true for indexed arrays _and_ associative arrays. So it actually dereferences a slot with key "0" and substitutes the value that is there? And substitutes nothing if there is no key "0"? Or ...? (In the zsh implementation from my + PWS's patches, with `emulate ksh' in effect, $arrayname prints the first hash table element in whatever order the hash happens to get traversed, which may change as elements are added. That leads to the question, how do you remove a particular key/value pair from a ksh93 associative array?) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com