Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Greg Wooledge 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: 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: =?iso-8859-1?B?TOlh?= Gris Envelope-to: bug-bash@gnu.org Mail-Followup-To: =?iso-8859-1?B?TOlh?= Gris , 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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.