From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1667 invoked from network); 10 Aug 1998 18:36:36 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 10 Aug 1998 18:36:36 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id OAA14896; Mon, 10 Aug 1998 14:11:25 -0400 (EDT) Resent-Date: Mon, 10 Aug 1998 14:11:25 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980810111340.ZM27558@candle.brasslantern.com> Date: Mon, 10 Aug 1998 11:13:40 -0700 In-Reply-To: <35CF1EDF.4728CD91@sni.de> Comments: In reply to Andrej Borsenkow "Re: sorting/uniq-ing an array?" (Aug 10, 8:25pm) 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> In-Reply-To: <199808101632.RAA32056@diamond.tao.co.uk> Comments: In reply to "Zefram" "Re: sorting/uniq-ing an array?" (Aug 10, 5:32pm) 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: <"eoiDj3.0.he3.DVppr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4293 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 10, 5:32pm, Zefram wrote: } Subject: Re: sorting/uniq-ing an array? } } Bart Schaefer wrote: } >Is there any difference (internally) between a plain array variable and } >a colon-array, other than the set/get functions? } } Yes. Colon-separated `arrays' are actually scalars. Ah, yes, of course. What I'm asking is, other than changing the cfn.gets and cfn.sets members of the param struct to point at colonarrgetfn and colonarrsetfn, is there any other magic involved in managing colon-arrays? On Aug 10, 8:25pm, Andrej Borsenkow wrote: } Subject: Re: sorting/uniq-ing an array? } } But the main problem is user interface. Standard variables are lower } case for arrays/upper case for scalars. 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. } typeset -C => implicitly creates upper case scalar } version I think this is the wrong approach. I think creating the colon-array scalar and linking it to an array should be two separate steps (or at least two separate typeset flags). I don't think zsh should be in the business of enforcing upper/lower case; in fact, I don't even think it should even be a requirement that the two variables have similar names! -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com