[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Counting words, fast!
From: |
Lawrence Velázquez |
Subject: |
Re: Counting words, fast! |
Date: |
Sat, 20 Mar 2021 00:25:28 -0400 |
> On Mar 19, 2021, at 11:18 PM, Koichi Murase <myoga.murase@gmail.com> wrote:
>
> For the associative array, I somehow could not find in the manual even
> a description that the associative arrays support the assignment of
> the form `name[subscript]=value'.
It is later on the same page:
When assigning to an associative array, the words in a compound
assignment may be either assignment statements, for which the
subscript is required, or a list of words that is interpreted as
a sequence of alternating keys and values: name=(key1 value1
key2 value2 ...). These are treated identically to name=(
[key1]=value1 [key2]=value2 ...). The first word in the list
determines how the remaining words are interpreted; all
assignments in a list must be of the same type. When using
key/value pairs, the keys may not be missing or empty; a final
missing value is treated like the empty string.
This syntax is also accepted by the "declare" builtin.
Individual array elements may be assigned to using the
name[subscript]=value syntax introduced above.
vq
Re: Counting words, fast!, Koichi Murase, 2021/03/19
- Re: Counting words, fast!, Dennis Williamson, 2021/03/19
- Re: Counting words, fast!, Jesse Hathaway, 2021/03/19
- Re: Counting words, fast!, Koichi Murase, 2021/03/19
- Re: Counting words, fast!, Koichi Murase, 2021/03/19
- Re: Counting words, fast!,
Lawrence Velázquez <=
- Re: Counting words, fast!, Jesse Hathaway, 2021/03/22