Re: converting a string to an IDL command [message #62390 is a reply to message #62384] |
Mon, 08 September 2008 10:30   |
Bob[3]
Messages: 60 Registered: December 2006
|
Member |
|
|
On Sep 8, 12:46 pm, Mark <astrobo...@gmail.com> wrote:
> Hello!
>
> I find myself constantly doing things like:
>
> print,' min(x), max(x) ',min(x),max(x)
>
> Is is possible to do something along the lines of:
>
> char=' min(x),max(x) '
> some_function,char
>
> where some_function would change char into one line of IDL code? That
> is, if x=findgen(10)
> sub_function would print something like:
>
> min(x),max(x) ,0.000 ,9.000
>
> Seems like this wouldn't be so hard. I'm interested in something that
> would work with Unix.
> Thanks,
>
> Mark
result=execute('print,"'+char+'",'+char)
|
|
|