Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15323

Re: Associative array entries order differs from declaration

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: Associative array entries order differs from declaration
Date Thu, 15 Aug 2019 11:32:00 -0400
Lines 13
Approved bug-bash@gnu.org
Message-ID <mailman.169.1565883131.30381.bug-bash@gnu.org> (permalink)
References <71660c94-58cc-c87f-9e5f-c0aa32013097@noiraude.net> <20190815153200.GQ1218@eeg.ccf.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding 8bit
X-Trace usenet.stanford.edu 1565883131 8742 209.51.188.17 (15 Aug 2019 15:32:11 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To Léa Gris <lea.gris@noiraude.net>
Envelope-to bug-bash@gnu.org
Mail-Followup-To Léa Gris <lea.gris@noiraude.net>, bug-bash@gnu.org
Content-Disposition inline
In-Reply-To <71660c94-58cc-c87f-9e5f-c0aa32013097@noiraude.net>
User-Agent Mutt/1.10.1 (2018-07-13)
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From 139.137.100.1
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <20190815153200.GQ1218@eeg.ccf.org>
X-Mailman-Original-References <71660c94-58cc-c87f-9e5f-c0aa32013097@noiraude.net>
Xref csiph.com gnu.bash.bug:15323

Show key headers only | View raw


On Thu, Aug 15, 2019 at 05:26:03PM +0200, Léa Gris wrote:
> Is there a way to control the order of entries in an associative array?

No.

> What rules applies to the order of entries?

None.

If you require both an associative array and an ordered list, then you
will need two different data structures for that.  The ordered list may
be implemented as an indexed array, which preserves ordering.

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Associative array entries order differs from declaration Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-15 11:32 -0400

csiph-web