From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8280 invoked from network); 10 Aug 1998 16:36:49 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 10 Aug 1998 16:36:49 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA12893; Mon, 10 Aug 1998 12:22:51 -0400 (EDT) Resent-Date: Mon, 10 Aug 1998 12:22:51 -0400 (EDT) Message-ID: <35CF1EDF.4728CD91@sni.de> Date: Mon, 10 Aug 1998 20:25:03 +0400 From: Andrej Borsenkow X-Mailer: Mozilla 4.5b1 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Bart Schaefer CC: ZSH Users Subject: Re: sorting/uniq-ing an array? References: <19980809025636.18149@astaroth.nit.gwu.edu> <980809044123.ZM19065@candle.brasslantern.com> <19980809123608.01170@astaroth.nit.gwu.edu> <980810085553.ZM27103@candle.brasslantern.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-Message-ID: <"gcOgN.0.O93.Rvnpr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4291 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Bart Schaefer wrote: > > On Aug 10, 12:34pm, Bruce Stephens wrote: > } Subject: Re: sorting/uniq-ing an array? > } > } "typeset -U" works for arrays, and so works for path. Unfortunately, > } it doesn't work with (for example) LD_LIBRARY_PATH, which is a > } colon-separated list. Annoying: this really needs configurableness. > > Is there any difference (internally) between a plain array variable and > a colon-array, other than the set/get functions? If not, it should be > pretty trivial to make colon-arrays a typeset-able parameter type. > It is the main difference; there are some subteltis, as far as I remember. But the main problem is user interface. Standard variables are lower case for arrays/upper case for scalars. What should really be done (assuming typeset -C stays for creating colon-array variable): typeset -C => implicitly creates upper case scalar version (or the variant of it for scalar => array) What, if the name is not all upper/lower case? What, if variable to be created exists? Or exists and is empty? typeset -C => allowing arbitrary binding the same question with existing/empty variables What to do, if one of such variables is explicitly unset? (Which one is "master":) Going from implementation, scalar variable doesn't actually exists and is created "on the fly", but in real life it is exactly scalar which is used as base value. Should the second disappear as well? -- ============================================================ Andrej Borsenkow Fax: +7 (095) 796 99 20 SNI ITS Moscow Tel: +7 (095) 796 99 24 NERV: borsenkow.msk E-Mail: borsenkow.msk@sni.de ============================================================