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

Home » Public Forums » archive » Re: On Pointers and Culture
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: On Pointers and Culture [message #42994 is a reply to message #42991] Fri, 04 March 2005 00:16 Go to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
Michael Wallace wrote:
> I've finally reached an impasse in my IDL programming. Arrays just
> aren't doing it for me anymore. As of a few minutes ago I starting
> teaching myself IDL pointers. Does IDL already have implementations of
> the common data structures such as stacks, queues and trees or will I
> need to compose my own? I figured it was easier to ask the group and go
> to bed (it's 1:30AM local time) and see responses in the morning than
> trying to slog through IDL documentation at such a late hour. Although
> the documentation would probably make better sense now...
>
> -Mike

You can found basic data structures in RSI user contributed library
( http://www.rsinc.com/codebank/search.asp?search=category& ;product=IDL&catid=16)
. See the hashtable and vector.

Also D.Fanning has a linkedlist implementation
(http://www.dfanning.com/programs/linkedlist__define.pro)

and Craig Markwardt has an implemententation of hash
( http://cow.physics.wisc.edu/~craigm/idl/down/hashtable__defi ne.pro).

With all this you have: hashtables, lists and staks.

If you are new on IDL pointers remember are not the same as C pointers.
Now you have your "conventional" memory (managed by IDL) and the HEAP
memory (managed by yourself).

a = INDGEN(100)
p = PTR_NEW(a)

This lines creates an 'a' vector and 'p' pointer variable in the
conventional memory, also copies the same 'a' vector into HEAP memory a
makes 'p' points this.
Maybe, it is better:

p = PTR_NEW( INDGEN(100) )

Now, you only have a 'p' pointer variable in conventional memory and an
array in the HEAP memory.

Bye.
Antonio

(Sorry about mu poor enligh :)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Arrays suck. Loops rock.
Next Topic: surface fitting...

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

Current Time: Sun Oct 12 08:07:33 PDT 2025

Total time taken to generate the page: 0.96145 seconds