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

Home » Public Forums » archive » Re: hashmap in idl
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: hashmap in idl [message #67441 is a reply to message #67232] Wed, 22 July 2009 19:10 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
b.a writes:

> Sorry for being so confusing :( here is what happens to my program:
>
> I want to have a linkedlist that has several pairs of "key"(LONG) and
> "data"(a 2D array). each time I want to add something to the
> linkedlist, I will specify the key(which would be an id of one of the
> new created widgets in my program), and the data which is read from a
> file and be kept as 2D array. number of elements added to or deleted
> from the linkedlist is not fixed.
>
> I used to think that if I just write for example:
>
> key1 = 197
> data1 = data
> mylist = Obj_New("LINKEDLIST")
> mylist->Add, key1, data1
>
> it is enough and it should work. But it seems that first I have to
> define several methods or functions - such as defining the linkedlist
> structure, pro add-after, pro add-before, delete , ...- and then the
> compiler would recognize what "mylist->Add, key1, data1" means and so
> on. I mean before my main program I have to implement at least these:
>
> PRO LINKEDLIST__DEFINE
> PRO LINKEDLIST::ADD, item, index, Before=before, After=after
> PRO LINKEDLIST::ADD_AFTER, item, index
> PRO LINKEDLIST::ADD_BEFORE, item, index
> PRO LINKEDLIST::ADD_TO_END, item
> PRO LINKEDLIST::DELETE_NODE, index, DESTROY=destroy
> FUNCTION LINKEDLIST::GET_NODE, index
> FUNCTION LINKEDLIST::GET_ITEM, index, Dereference=dereference, ALL=all
>
> here my key is actually the index, but I define it myself. I allocate
> a number to each data. Is it true?

No, it is not true. In fact, it is so far from being true
it isn't even wrong. It's...I don't know. Nonsense, probably. :-)

But, clearly, you must have some reason for believing this.
What I have been trying to understand, so I can help you,
is what this reason is. Do you have some *evidence* you
would like to present that supports your idea?

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: speed up image processing
Next Topic: Re: problems with IDL-IDL bridge spawning

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

Current Time: Thu Oct 09 22:37:57 PDT 2025

Total time taken to generate the page: 0.56093 seconds