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

Home » Public Forums » archive » delvar
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: delvar [message #14324 is a reply to message #14262] Tue, 09 February 1999 00:00 Go to previous messageGo to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <36c05a04.0@208.206.112.5> "Dominic Zarro"
<zarro@tidalwave.net> writes:

> Actually, my last response was incorrect.
> A better way, using pointers is as follows:
>
> ;-- to delete a variable var
>
> ;-- allocate a pointer
>
> *p=ptr_new(/all)

Hi Dominic,

I guess you mean

p=ptr_new(/alloc)

(Seeing the "/all" in the ptr_new made me *really* confused,
I think the two extra letters are very clarifying :-)

[..]
>
> You can easily package the above into a simple
> procedure that deletes any variable var.

How about a one-line "syllogism":

ptr_free,ptr_new(temporary(var))

It's amazing what you have to do to delete a variable in IDL :-)

This discussion reminded me of a procedure I wrote some time in
1994, called like this:

ASSIGN_NOCOPY,destination,source

This was way before temporary() appeared on stage, and it even
(still) has checks to function (resorts to copying) with IDL
3.0, which didn't even have the NO_COPY keyword in the
WIDGET_CONTROL,GET_UVALUE=var mechanism....

Then came the handles, and then...

Which again reminds me - it would be *really* nice if RSI would
start putting in "Not before version X.XX" information in the
online documentation for (new) features. It's tiresome enough
trying to write version-sensitive code, and I just don't need
the extra work required to check exactly which of the current
features go back to this or that version...

Stein Vidar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 3D projection rotation
Next Topic: device,decomposed=0

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

Current Time: Sun Oct 12 13:57:45 PDT 2025

Total time taken to generate the page: 0.48083 seconds