Linked List [message #8505] |
Thu, 20 March 1997 00:00  |
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  |
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  |
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  |
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  |
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
|
|
|