Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
using array slice as lvalue
- X-seq: zsh-users 15661
- From: Le Wang <l26wang@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: using array slice as lvalue
- Date: Tue, 21 Dec 2010 15:42:16 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=6LP+3p6sKfTF1REXVP+OySP4Cm95LbbEs079W8XmzeQ=; b=RhSpwY75tqAjPpjNNGNbB+CEobGHf7oK5V0x2IDcVZWJChRLydgxH1UhGiklWDiJ5M 4QIXyjwQsJS11btnWCRXbp6wQ/dEdtdg8Os29Qpr8R/ZM0G4qcgW/kcPOFTcNPXJzecZ 1BlDH0ilpdQOpGTL1sSQZVYr0oaWlfMxL8Ml8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=wj3krUJJFsLdoafQHLoJgjHZT/fBlsvKE0Wcp5UHz+KVD4+ldXpiYtJxmfEeSPz8XM NJZ0mQFDC2fxBou32LLIdT8c9gv6ySJTU4l/xj8XkdK94NZrq+CPtTUBoqlcZW/FZMeV 8H7oQfKRYV876DqjGEPo9iqo3UBPI/wUWOysQ=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author