From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23028 invoked from network); 11 Aug 1998 18:04:02 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 11 Aug 1998 18:04:02 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id NAA04151; Tue, 11 Aug 1998 13:57:00 -0400 (EDT) Resent-Date: Tue, 11 Aug 1998 13:57:00 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980811105916.ZM32066@candle.brasslantern.com> Date: Tue, 11 Aug 1998 10:59:16 -0700 In-Reply-To: Comments: In reply to Bruce Stephens "Re: sorting/uniq-ing an array?" (Aug 11, 10:31am) References: <19980809025636.18149@astaroth.nit.gwu.edu> <980809044123.ZM19065@candle.brasslantern.com> <19980809123608.01170@astaroth.nit.gwu.edu> <980810085553.ZM27103@candle.brasslantern.com> <35CF1EDF.4728CD91@sni.de> <199808101632.RAA32056@diamond.tao.co.uk> <980810111340.ZM27558@candle.brasslantern.com> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@math.gatech.edu Subject: Re: sorting/uniq-ing an array? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"vdPiw.0.o01.iN8qr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4297 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 11, 10:31am, Bruce Stephens wrote: } Subject: Re: sorting/uniq-ing an array? } } "Bart Schaefer" writes: } } > Standard linked pairs of arrays and colon-arrays behave that way, } > yes. I'm not (yet) suggesting adding that sort of linkage. I'm } > interested only in being able to declare a colon-array variable. } > For example, I can't think of any reason to create ld_library_path } > as an array. } } Being able to create new special variables would be sufficient for } this specific case. There are lots of kinds of special variables besides just colon-arrays. Most of them involve more special handling than just changing the set/get functions for the values. On further inspection I now understand that colonarr{set,get}fn are assuming that there's a global char ** somewhere (pointed to by the param struct) in which to store the associated array representation, so it's not merely a matter of changing the functions even for this case. } I was playing around with a variety of installed } Tcl libraries, and it was handy to change my LD_LIBRARY_PATH quite a } lot interactively. vared works a lot better on colon-arrays (scalars) than on true arrays. } Indeed, arrays have some nice syntax in zsh, which might be } convenient. Or are you suggesting using the same syntax for } colon-arrays? I'm not (at this point) suggesting changing any syntax other than to add something to typeset. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com