zsh-users
 help / color / mirror / code / Atom feed
* values of associations pointed by P flag
@ 2006-05-23 12:12 Marc Chantreux
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Chantreux @ 2006-05-23 12:12 UTC (permalink / raw)
  To: zsh-users

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@ulpmm.u-strasbg.fr
---------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread
* values of associations pointed by P flag
@ 2006-05-23 12:18 Marc Chantreux
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Chantreux @ 2006-05-23 12:18 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 8+ messages in thread
* values of associations pointed by P flag
@ 2006-05-23 12:13 Marc Chantreux
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Chantreux @ 2006-05-23 12:13 UTC (permalink / raw)
  To: zsh-users

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@ulpmm.u-strasbg.fr
---------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread
* values of associations pointed by P flag
@ 2006-05-22 20:54 Marc Chantreux
  2006-05-23 15:14 ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Chantreux @ 2006-05-22 20:54 UTC (permalink / raw)
  To: zsh-users

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@ulpmm.u-strasbg.fr
---------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread
* values of associations pointed by P flag
@ 2006-05-22 20:51 Marc Chantreux
  2006-05-23 12:21 ` Marc Chantreux
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Chantreux @ 2006-05-22 20:51 UTC (permalink / raw)
  To: zsh-users

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@ulpmm.u-strasbg.fr
---------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-05-25 14:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-23 12:12 values of associations pointed by P flag Marc Chantreux
  -- strict thread matches above, loose matches on Subject: below --
2006-05-23 12:18 Marc Chantreux
2006-05-23 12:13 Marc Chantreux
2006-05-22 20:54 Marc Chantreux
2006-05-23 15:14 ` Bart Schaefer
2006-05-25 14:43   ` Marc Chantreux
2006-05-22 20:51 Marc Chantreux
2006-05-23 12:21 ` Marc Chantreux

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).