Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
values of associations pointed by P flag
- X-seq: zsh-users 10295
- From: Marc Chantreux <marc.chantreux@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: values of associations pointed by P flag
- Date: Tue, 23 May 2006 14:18:52 +0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi all,
I would like to write a function that compare 2 associative arrays. I
can use eval but the P flag looks better. So i wrote some tests :
# expected is
= 12
= 24
typeset -A u; u=( a 12 b 24 ) x=u
for k ( ${(Pk)x} ) print $k'= '${(P)x[$k]}
a= 12 24
b= 12 24
for k ( ${(Pk)x} ) print $k'= '${${(P)x}[$k]}
a= 12
b= 12
... tried other unsuccessfull syntaxes.
Do i have a chance to don't use eval ?
regards
mc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author