Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 3.1.5 - sample associative array implementation
- X-seq: zsh-workers 4619
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Timothy Writer <Tim.Writer@xxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: PATCH: 3.1.5 - sample associative array implementation
- Date: Thu, 12 Nov 1998 17:32:01 -0800
- In-reply-to: <m367ck7907.fsf@xxxxxxxxxxxxxxxxx>
- References: <9811111358.AA51361@xxxxxxxxxxxxxxxxx> <vb1znanvcm.fsf@xxxxxxxxxxxxxxx> <m3iugmj8y8.fsf@xxxxxxxxxxxxxxxxx> <981111125236.ZM3587@xxxxxxxxxxxxxxxxxxxxxxx> <m3d86t7235.fsf@xxxxxxxxxxxxxxxxx> <981112012358.ZM9722@xxxxxxxxxxxxxxxxxxxxxxx> <m367ck7907.fsf@xxxxxxxxxxxxxxxxx>
On Nov 12, 7:04pm, Timothy Writer wrote:
> Subject: Re: PATCH: 3.1.5 - sample associative array implementation
[Referring to ksh93]
>
> typeset -A foo
> foo[bar]=baz
> echo ${!foo}
>
> just prints "foo". Makes sense because foo is not a nameref.
That's not what I would have expected; I would have expected it to either
(a) behave the same as ${foo} [which means what, when foo is an associative
array?] or (b) print nothing, because there's no variable to which the value
of foo can possibly refer. Printing its own *name* like that isn't sensible
to me.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author