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

Home » Public Forums » archive » Re: Sort a HASH
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Aw: Re: Sort a HASH [message #76665 is a reply to message #76664] Fri, 24 June 2011 01:37 Go to previous messageGo to previous message
JDS is currently offline  JDS
Messages: 94
Registered: March 2009
Member
You appear to be asking why a HASH is not ordered. Having been familiar with HASH's from other languages, I did not expect them to be ordered. What is peculiar here, is that, without converting hashes into a more primitive data type, there is no way to order them yourselves (or rearrange them in any way, other than a loop)! That is in stark contrast to other languages. For example, a common idiom in Perl is:

foreach key (sort keys %hash) {
% do something
}

Is there really no equivalent in IDL?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Connecting GPC to IDL
Next Topic: PostScript Window Size

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

Current Time: Fri Oct 10 02:38:08 PDT 2025

Total time taken to generate the page: 2.07966 seconds