Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

values of associations pointed by P flag



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