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

Home » Public Forums » archive » Re: executing a string in VM without using '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: executing a string in VM without using 'EXECUTE' [message #50638 is a reply to message #50637] Fri, 06 October 2006 02:30 Go to previous message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
Gav,

Maybe I'm missing something but if your 'formula' is fixed then you
don't need execute at all, you can just write:

speci=where(mr[*,*,159] le 8 or $
mr[*,*,170] gt mr[*,*,159] or $
mr[*,*,235] gt mr[*,*,159],speccount)

Execute is only required when the code you're going to be running isn't
known at compile time. For instance if you had an interactive program
where a user could type IDL syntax into a text widget or at the command
line.

Thanks,

Allan

gav wrote:
> Hi Guys,
>
> There is probably a simple solution to this but I can't find it: I
> want to execute the string below in VM, without using (can't use) the
> 'EXECUTE' command. Any ideas / code etc greatfully received.
>
>
> com='speci=where('+formula+',speccount) ';write executable
> string
> t=execute(com) ;execute string
>
> the 'formula' is "(mr(*,*,159) le 8 or mr(*,*,170) gt mr(*,*,159)
> or mr(*,*,235) gt mr(*,*,159) )"
> cheers
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: executing a string in VM without using 'EXECUTE'
Next Topic: Re: wrapper functions

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

Current Time: Sat Oct 11 06:37:13 PDT 2025

Total time taken to generate the page: 2.07584 seconds