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

Home » Public Forums » archive » HASH question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: HASH question [message #75453 is a reply to message #75367] Mon, 07 March 2011 13:05 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Mar 7, 6:00 pm, Chris Torrence <gorth...@gmail.com> wrote:
> Hi all,
>
> You could also use a nested hash of hashes. For example:
>
> h = HASH('Sirius', HASH('Color': 'blue', 'Size': 'big'), 'Betelgeuse',
> HASH(...), ...)
>
> In IDL 8.1 you will be able to index into array/list/hash elements
> within a Hash (or List) using simple array indexing. So in the above
> case, you would be able to do:
>    print, h['Sirius', 'Color']
> And it will print out "blue".
>
> This also works for assignment as well.
>    h['Sirius', 'Color'] = 'white'

Nice. Just what I was doing with an inherited class. Any predictions
on when 8.1 will be out? Maybe I will not have to finish the half-
written classes I have.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 8.0 image() scaling
Next Topic: Floating illegal operand error when reach end of for loop

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

Current Time: Fri Oct 10 00:58:30 PDT 2025

Total time taken to generate the page: 1.44363 seconds