From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18233 invoked from network); 14 Dec 1998 11:01:34 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 14 Dec 1998 11:01:34 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id FAA01038; Mon, 14 Dec 1998 05:57:04 -0500 (EST) Resent-Date: Mon, 14 Dec 1998 05:57:04 -0500 (EST) Date: Mon, 14 Dec 1998 11:55:24 +0100 (MET) Message-Id: <199812141055.LAA07255@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu Subject: Problem with associative arrays Resent-Message-ID: <"r4_iF1.0.9G._xETs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4770 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello Subscripts for associative arrays are matheval()ed which makes some problems: % set -A a % a[foo]=bar % echo $a[baz] bar There is no variable baz, so evaluating it yields zero and since numeric subscripts on associative arrays work, this yields the `first' value. % a[x*]=frob zsh: bad math expression: unbalanced stack zsh: bad math expression: unbalanced stack Yes, `x*' is an invalid math expression, but... Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de