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

Home » Public Forums » archive » procedure with arbitrary parameter
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: procedure with arbitrary parameter [message #76405 is a reply to message #76259] Mon, 30 May 2011 11:29 Go to previous messageGo to previous message
Evianis Cruz is currently offline  Evianis Cruz
Messages: 4
Registered: May 2011
Junior Member
On May 30, 1:13 pm, Michael Galloy <mgal...@gmail.com> wrote:
> On 5/30/11 10:53 AM, Evianis Cruz wrote:
>
>> So in my procedure call I have something like this
>
>> pro test, filename, var
>
>> restore, filename
>> plot, var
>
>> end
>
>> var will be the name of the variable I want to plot from restoring the
>> file. I'm thinking of giving var as a string in the procedure call. My
>> question is how would I do this and is it possible?
>
> Like this?
>
> function mg_getsavvar, filename, varname
>    compile_opt strictarr
>
>    restore, filename=filename
>    result = execute('plot, ' + varname)
> end
>
> Mike
> --
> Michael Galloywww.michaelgalloy.com
> Modern IDL, A Guide to Learning IDL:http://modernidl.idldev.com
> Research Mathematician
> Tech-X Corporation

Thank you!! :)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Automatic Binsize Calculations
Next Topic: How to plot multiple cgContour plots using the same colour levels (but containing differing data)

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

Current Time: Sun Oct 12 16:52:37 PDT 2025

Total time taken to generate the page: 0.47989 seconds