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

Home » Public Forums » archive » Linked List
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: Linked List [message #8610 is a reply to message #8505] Wed, 26 March 1997 00:00 Go to previous messageGo to previous message
hto is currently offline  hto
Messages: 15
Registered: April 1996
Junior Member
On 22 Mar 1997 03:56:28 GMT, martin@uthscsa.edu (Charles Martin)
wrote:

> In article <333118AC.41C67EA6@pml.ac.uk>, Nigel Helliwell <nih@pml.ac.uk> wrote:
>
>> Hi all,
>> I'm trying to create a linked list structure in IDL, it is a list of
>> records(structures) which I need to create dynamically.
>>
>> POINTER TO record
>> record = {NAME,VAR1,VAR2,..,(POINTER TO NEXT RECORD)}
>> etc.
>> If anymone has any idea how to go about this please could you give me a
>> few ideas.
>> Thankyou,
>> Nigel.
>> <nih@pml.ac.uk>
>
> I think you can do it with handles. IDL version 5 is supposed to have
> pointers. If this is the case then you may want to wait until you get V5.
>
> Charles Martin
> University of Texas

IDL has builtins to create and manage linked lists. Use
handle_create, handle_info, etc. It's very straightforward and
elegant. You do not have (or need) direct access to the link
pointers. All links are accessed via link id's. You can explicitly
access the first record and then succeeding records until the list is
exhausted (id of -1 returned). Therefore you can create while loops
to operate on the entire list without needing to know the number of
elements in the list (although that is readily available). You can
also deallocate individual elements or the entire list (with one line
of code) and I believe that the memory is returned to the IDL pool for
reuse.

Howard Onishi
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Square pixels in surface/lego plots
Next Topic: Satellite Image Mapping Tool Update

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

Current Time: Sun Oct 12 09:22:51 PDT 2025

Total time taken to generate the page: 0.88137 seconds