zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: Explain array append a bit better
Date: Fri, 05 Dec 2014 00:05:51 -0800	[thread overview]
Message-ID: <141205000551.ZM9630@torch.brasslantern.com> (raw)
In-Reply-To: <CAHYJk3R49_MSWWQQ_HTb-iFWnZQ_99LUeLKrVbC8WA=a8AeLgg@mail.gmail.com>

On Dec 5,  8:28am, Mikael Magnusson wrote:
}
} Should we perhaps mention array prepending somewhere too?

I suppose, but it's a special case of array slice assignment whereas
append is a whole different assignment operator with special behavior
for associative arrays.

Consequently I think this text ...

} +To prepend to an array, use the syntax (requires that tt(KSH_ARRAYS)
} +and tt(KSH_ZERO_SUBSCRIPT) are not set):
} +ifzman()
} +indent(var(name)tt([)var(1,0)tt(]=LPAR())var(value) ...tt(RPAR()))

... ought to be in "15.2.2 Array Element Assignment" rather than in
the introductory paragraphs in "15.2 Array Parameters".  Otherwise
you're introducing subscript assignment syntax without having told
the reader what it means.


  reply	other threads:[~2014-12-05  8:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04  4:51 Bart Schaefer
2014-12-05  7:28 ` Mikael Magnusson
2014-12-05  8:05   ` Bart Schaefer [this message]
2014-12-05 12:25   ` Oliver Kiddle

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=141205000551.ZM9630@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).