From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 766 invoked from network); 13 Nov 1998 18:05:11 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 13 Nov 1998 18:05:11 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id NAA16542; Fri, 13 Nov 1998 13:02:44 -0500 (EST) Resent-Date: Fri, 13 Nov 1998 13:02:44 -0500 (EST) From: "Bart Schaefer" Message-Id: <981113100119.ZM17408@candle.brasslantern.com> Date: Fri, 13 Nov 1998 10:01:18 -0800 X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@math.gatech.edu Subject: Spaces in associative array keys MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"G2UsU3.0.P24.4H7Js"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4626 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu zagzig<1> typeset -A foo zagzig<2> foo[bar]=fred zagzig<3> foo[7]="the winter of our discontent" zagzig<4> foo[$foo[7]]=shakespeare zsh: bad math expression: unbalanced stack zagzig<5> print -l "$foo[@]" shakespeare the winter of our discontent fred zagzig<6> print -l "${(k)foo[@]}" the winter of our discontent 7 bar The only way I could get zsh to accept spaces in the [ ] was to use a variable reference, and then I get the "unbalanced stack" error on the first reference, even though it does work thereafter. Gotta go now, perhaps more on this over the weekend. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com