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

Home » Public Forums » archive » Re: alternative to execute available?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: alternative to execute available? [message #72878] Wed, 13 October 2010 08:05
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Chris writes:

>> for i=0l,n_tags(ex)-1l do (scope_varfetch((tag_names(ex))[i], /enter))=ex.(i)
>>
>> regards,
>> lajos
>
> Very cool! THANK YOU!

Now you're programming like an iTools developer! ;-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: alternative to execute available? [message #72880 is a reply to message #72878] Wed, 13 October 2010 08:00 Go to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
On 13 Okt., 16:22, FÖLDY Lajos <fo...@rmki.kfki.hu> wrote:
> On Wed, 13 Oct 2010, chris wrote:
>> Hi there,
>> I'm often using the _extra keyword in my routines together with a
>> simple approach to give variables values, like this one
>
>> pro test_ex, _extra=ex
>> for i=0l,n_tags(ex)-1l do _=execute((tag_names(ex))[i]+'=ex.(i)')
>> end
>
>> If I would call this like:  test,/hello,d=dist(10)
>> it would give me within the pro: d with the value dist(10) and hello
>> with the value 1
>
>> It works fine, but has one big limitation. I cannot use this technique
>> if I would like to produce working binaries (sav-files). Is there any
>> way to avoid the execute call without having information which
>> keywords were passed to the test_ex routine?
>
>> Thanks and regards
>
>> CR
>
> for i=0l,n_tags(ex)-1l do (scope_varfetch((tag_names(ex))[i], /enter))=ex.(i)
>
> regards,
> lajos

Very cool! THANK YOU!

Cheers

CR
Re: alternative to execute available? [message #72883 is a reply to message #72880] Wed, 13 October 2010 07:22 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Wed, 13 Oct 2010, chris wrote:

> Hi there,
> I'm often using the _extra keyword in my routines together with a
> simple approach to give variables values, like this one
>
> pro test_ex, _extra=ex
> for i=0l,n_tags(ex)-1l do _=execute((tag_names(ex))[i]+'=ex.(i)')
> end
>
> If I would call this like: test,/hello,d=dist(10)
> it would give me within the pro: d with the value dist(10) and hello
> with the value 1
>
> It works fine, but has one big limitation. I cannot use this technique
> if I would like to produce working binaries (sav-files). Is there any
> way to avoid the execute call without having information which
> keywords were passed to the test_ex routine?
>
> Thanks and regards
>
> CR


for i=0l,n_tags(ex)-1l do (scope_varfetch((tag_names(ex))[i], /enter))=ex.(i)

regards,
lajos
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Official "release" of Coyote and Catalyst Libraries
Next Topic: Re: Official "release" of Coyote and Catalyst Libraries

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

Current Time: Wed Oct 08 17:25:39 PDT 2025

Total time taken to generate the page: 0.00616 seconds