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 #42987 is a reply to message #42985] Fri, 04 March 2005 06:05 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Antonio Santiago writes:

> If you are new on IDL pointers remember are not the same as C pointers.

Another way they are different, and this surprises even
people who have used them for awhile, is that they are
much more forgiving of rough handling. More like
IDL variables, really, than pointers. So you can
do something like this:

ptr = Ptr_New([1,4,6]) ; Pointer to array
*ptr = 8.4 ; Pointer now points to scalar
Print, *ptr
8.4

And there is no leaking of memory because IDL
manages all this for you, as it does with variables.
Naturally, this is dangerous, etc., but it is
so, so nice. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[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 17:06:15 PDT 2025

Total time taken to generate the page: 1.43635 seconds