Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
values of associations pointed by P flag
- X-seq: zsh-users 10293
- From: Marc Chantreux <marc.chantreux@xxxxxxxxxxxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: values of associations pointed by P flag
- Date: Tue, 23 May 2006 14:12:49 +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
--
tel: 03 90 24 50 00
mel: marc.chantreux@xxxxxxxxxxxxxxxxxx
---------------------------------------
Messages sorted by:
Reverse Date,
Date,
Thread,
Author