Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Removing an element from an array
- X-seq: zsh-users 26146
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Peter Slížik <peter.slizik@xxxxxxxxx>
- Subject: Re: Removing an element from an array
- Date: Mon, 2 Nov 2020 10:31:21 -0800
- Archived-at: <https://zsh.org/users/26146>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-11/CAH%2Bw%3D7ZYHBF9V2VJ4ftvbCk5DhPsKvT%3DiMN-SFd4GWM%3DJkATWg%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-oo1-f49.google.com) smtp.remote-ip=209.85.161.49; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=fY8D1v3pCJK4Ng/F/lD/kAlPFxEf+7alqrHQj1uaIuc=; b=gQ+zzf9Z8L7mrMonWFfjodsUONBtx9tSLKSAV/HxgFPNSW0cnf16nvzZ+nAZfLw4n3 T2wx+RYjwfYF4YQ5+zXPlyQGgwkLzL/DZs9blEH5bgH7NUoN0+AV3mhwM4P5JlI6eMwi AkA/mrPFAKs+Vbt72zhFWJFc8ksT0RKthDCj5bs0y5NCLBFmP/46uhsi2jDpGgQZaEIp Ceu9lrGVJyXYh3/KCa5iakgpnjuG6qkUtng9uUoWJQn3Wt8UBP5Uk6vz3We/l0KaPR12 O+lb0LPq19HpAoW2tPQeGty9BY9G6VPcOU0or5eSHfH74O5FxgWjy2jS0I15WCBJQTMW Vr2g==
- In-reply-to: <CAC-uhUAPKg9LP-Tt-5bkQYR5n57m6L=EZzLhtKJ=q4hRB1qcYQ@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- References: <CAC-uhUCeckrWr-F-hsXtktYO8G8Ts1=Opyg4S0Xb9Y4bMKnCKg@mail.gmail.com> <CAN=4vMoAcip8q_zTm1-R-81d15OP9o6_Gyu7cvcpdbE-BLScVg@mail.gmail.com> <CAC-uhUAPKg9LP-Tt-5bkQYR5n57m6L=EZzLhtKJ=q4hRB1qcYQ@mail.gmail.com>
- Sender: zsh-users-request@xxxxxxx
On Mon, Nov 2, 2020 at 4:23 AM Peter Slížik <peter.slizik@xxxxxxxxx> wrote:
>
> By the way, can I ask why it is necessary to re-introduce the array context by another pair of parentheses, if the expression already produces an array value?
Assignment without the parens is a scalar context; the existing type
of the variable named on the left side is not considered during
parsing, and if the variable is not "special" the type may actually be
changed from array to scalar by the assignment operation.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author