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

Home » Public Forums » archive » Temporary variables still checked out ...
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: Temporary variables still checked out [message #15481 is a reply to message #13210] Wed, 26 May 1999 00:00 Go to previous message
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
philaldis@geocities.com wrote:
<...> Every time I run it, if I hit the okay button,
> I get the message from IDL 'Temporary variables still checked out', or
> at least it's virtually like that, after the program exits.
<...>
> I don't know what's going on, but is it something to do with the
> structures and passing by value etc.

Phil, you're essentially doing your assignment to a temporary variable
when you do something like (structure.member)=val instead of
structure.member=val. The brackets tell IDL to evaluate their
contents, and this incurs the creation of a temporary variable. The
assignment is lost when the temp variable is destroyed, and you get that
inscrutable "programmer's revenge" error message in lieu of a warning
that something hasn't worked out quite as you might have expected.

> ((*(info.ptr)).optIndex)[i,*] = 0
=> Instead of this, try (*info.ptr).optIndex[i,*]=0; etc.

Things DO get a bit unsettling when (structures of) pointers to
structures are involved, but a bit of command line action will
normally clarify IDL's workings with brackets soon enough. (Basically,
you must restrict your bracketing to just the pointer component(s).)
There was quite a bit of discussion about all this
some time back (at least a year) on the NG. As I recall, Stein Vidar
pretty much sussed out how it all works - it may be worth your while
searching a news archive for this thread.


Peter Mason


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
[Message index]
 
Read Message
Read Message
Previous Topic: Problem with IDL OCX
Next Topic: button text color

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

Current Time: Wed Oct 08 19:36:24 PDT 2025

Total time taken to generate the page: 0.00356 seconds