zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "Peter Slížik" <peter.slizik@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Removing an element from an array
Date: Mon, 2 Nov 2020 10:31:21 -0800	[thread overview]
Message-ID: <CAH+w=7ZYHBF9V2VJ4ftvbCk5DhPsKvT=iMN-SFd4GWM=JkATWg@mail.gmail.com> (raw)
In-Reply-To: <CAC-uhUAPKg9LP-Tt-5bkQYR5n57m6L=EZzLhtKJ=q4hRB1qcYQ@mail.gmail.com>

On Mon, Nov 2, 2020 at 4:23 AM Peter Slížik <peter.slizik@gmail.com> 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.


      reply	other threads:[~2020-11-02 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 11:11 Peter Slížik
2020-11-02 11:25 ` Roman Perepelitsa
2020-11-02 12:23   ` Peter Slížik
2020-11-02 18:31     ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7ZYHBF9V2VJ4ftvbCk5DhPsKvT=iMN-SFd4GWM=JkATWg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=peter.slizik@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).