Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug with associative arrays(?)
- X-seq: zsh-workers 5159
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Bug with associative arrays(?)
- Date: Tue, 2 Feb 1999 09:04:23 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Try this:
% foo=(a b)
% echo $foo
a b
% foo=bar
% echo $foo
bar
% typeset -A foo
% foo[a]=1
% foo[b]=2
% echo $foo
1 2
% foo=bar
% echo $foo
1 2 # Oops?
% echo ${(kv)foo}
a 1 b 2 # Yes, really.
...or is this the intended behavior? If so, why?
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author