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

Home » Public Forums » archive » Re: using of EXECUTE???
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: using of EXECUTE??? [message #7351] Mon, 11 November 1996 00:00 Go to previous message
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
On 8 Nov 1996, Hendrik Roepcke wrote:
> some people of this group warned me to use
> the IDL option:
> EXECUTE("???")
> It will mess up the memory-management of IDL
> after a while they estimated...
>
> But this option is wunderfull for dynamical
> management of data-array!!
> EXECUTE(name_of_array+"=findgen("+string(dim_of_array)+") ")
> shall I use execute or not?
> any hints?

I'd recommend using EXECUTE() only when there isn't a reasonably simple
"conventional" way to achieve your goal; e.g., for evaluating expressions
typed in by a user of your program.
The docs point out two issues:
. "Compiling the string (execute's arg) at run-time is inefficient..."
. "Do not use EXECUTE to create new variables inside procedures and
functions... (it will fail)" (Actually, this does seem to work with a
full IDL license. I suspect that it might be crippled under runtime IDL,
though - imagine runtime IDL with this restriction lifted.)

In your example above, the only extra facility that EXECUTE gives you which
you wouldn't get by simply doing SOME_VARNAME=FINDGEN(DIM_OF_ARRAY) is
indirect specification of the array's name. I think that this is really a
disadvantage - your program would always have to go via EXECUTE('some op
referencing name_of_array') to USE this new array, as it would only know the
array's name indirectly.


Peter Mason
[Message index]
 
Read Message
Read Message
Previous Topic: Re: IDL- variable variable names
Next Topic: Re: window events

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

Current Time: Wed Oct 08 18:35:37 PDT 2025

Total time taken to generate the page: 0.00380 seconds