zsh-users
 help / color / mirror / code / Atom feed
* using array slice as lvalue
@ 2010-12-21  7:42 Le Wang
  2010-12-21  8:45 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Le Wang @ 2010-12-21  7:42 UTC (permalink / raw)
  To: zsh-users

Hi,
I execute the following:

arr=(a b c)
arr[2,-1]=(z)
typeset arr # arr=(a z b c)
arr[1,-1]=(z)
typeset arr # arr=(z)

In the first slice assignment, the rvalue was inserted into the array
before arr[2], and the second slice assignment, the slice is assigned
to the rvalue.  Is the first behavior a bug?

--
Le


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

end of thread, other threads:[~2010-12-21 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-21  7:42 using array slice as lvalue Le Wang
2010-12-21  8:45 ` Bart Schaefer
2010-12-21 10:02   ` Peter Stephenson
2010-12-21 16:58     ` Bart Schaefer

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).