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

Home » Public Forums » archive » IDLVM and execute
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
IDLVM and execute [message #79045] Fri, 20 January 2012 12:36
TonyLanz is currently offline  TonyLanz
Messages: 4
Registered: January 2012
Junior Member
Hi all,
I realize this has been asked on the group before. I'm hoping someone
might have a "simple" workaround in IDLVM to what would be easily
accomplished using the execute function in IDL proper. I have a widget
program that contains a compound widget field that allows the user to
define an equation for manipulating a set of four variables. For the
sake of argument let's say var1, var2, var3, and var4. In this
compound widget field they can define what math they want to do,
they're restricted to addition, subtraction, multiplication and
division.

so they could for example enter

var1/var2
or
var1-var2*0.2
or
var1+var2+var3

etc., you get the idea. Now in IDL I can just get the value from the
widget and simply do something like

s='result='+cwidget_value(0)
status=execute(s)
print,result

of course in IDLVM I'm not allowed to use EXECUTE()

Anyone have any suggestions for implementing this simply? I know in
the past there was discussion of writing code to break down the string
and pass the pieces to the right operators or functions (using
call_function() ) to assemble the result.

Tony
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Write to a certain line of a file
Next Topic: ps_star.pro no found on IDL71?

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

Current Time: Wed Oct 08 13:51:54 PDT 2025

Total time taken to generate the page: 0.00483 seconds