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 
Switch to threaded view of this topic Create a new topic Submit Reply
Linked List [message #8505] Thu, 20 March 1997 00:00 Go to next message
Nigel Helliwell is currently offline  Nigel Helliwell
Messages: 3
Registered: August 1996
Junior Member
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>
Re: Linked List [message #8596 is a reply to message #8505] Thu, 27 March 1997 00:00 Go to previous message
Gilles Ratel is currently offline  Gilles Ratel
Messages: 5
Registered: March 1997
Junior Member
look HANDLE... attn. obsolete in IDL 5.0

Nigel Helliwell <nih@pml.ac.uk> wrote in article
<333118AC.41C67EA6@pml.ac.uk>...
> 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>
>
Re: Linked List [message #8610 is a reply to message #8505] Wed, 26 March 1997 00:00 Go 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
Re: Linked List [message #8620 is a reply to message #8505] Tue, 25 March 1997 00:00 Go to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
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>

Have a look at the HANDLES examples in the manual.

peter
Re: Linked List [message #8636 is a reply to message #8505] Sat, 22 March 1997 00:00 Go to previous message
martin is currently offline  martin
Messages: 18
Registered: January 1993
Junior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
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 13:57:41 PDT 2025

Total time taken to generate the page: 0.88209 seconds