comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » HASH -- bug, or "feature"?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
HASH -- bug, or "feature"? [message #75878] Wed, 20 April 2011 12:12
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
Can anyone tell me why, when you create a hash, the elements are not
in the order of the keys you give? And, even worse, when you index a
hash with an array of keys, the resulting hash does not come out in
the same order as the array?

IDL> h = hash(['a','b','c','d'],indgen(4))
IDL> print, h
c: 2
a: 0
b: 1
d: 3
IDL> print, h[['a','c','d']]
c: 2
a: 0
d: 3

This is making my bookkeeping using hashes basically impossible.

--Gray
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Determining which license is being used.
Next Topic: Re: HASH -- bug, or "feature"?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:06:23 PDT 2025

Total time taken to generate the page: 0.00464 seconds