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

Home » Public Forums » archive » Re: Virtual machine question
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: Virtual machine question [message #60773] Sun, 15 June 2008 07:39
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Jun 14, 3:58 pm, David Fanning <n...@dfanning.com> wrote:
> clivecoo...@gmail.com writes:
>> So i have a virtual machine application and i want to be able to pass
>> a path to it when i run it. So for example,
>
>> pro software, data_path
>
>> blah
>
>> blah
>
>> end
>
>> i then save this as a virtual machine program -> software.sav and i
>> run it as,
>
>> idl -vm=path+software.sav
>
>> So my question is how do i pass the data_path?
>
> You can't pass it directly into the program in the way
> you are trying to do it. Rather, you have to use a
> -arg command line switch on the IDL command you are using
> and pass it that way.
>
> Inside your program, you can recover the command line argument
> (or arguments) using the function COMMAND_LINE_ARGS.
>
> See the on-line help for "command line switches" for details.
>
> 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.")

You can also use environment variables, if appropriate.
Re: Virtual machine question [message #60776 is a reply to message #60773] Sat, 14 June 2008 13:58 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
clivecook59@gmail.com writes:

> So i have a virtual machine application and i want to be able to pass
> a path to it when i run it. So for example,
>
> pro software, data_path
>
> blah
>
> blah
>
> end
>
> i then save this as a virtual machine program -> software.sav and i
> run it as,
>
> idl -vm=path+software.sav
>
> So my question is how do i pass the data_path?

You can't pass it directly into the program in the way
you are trying to do it. Rather, you have to use a
-arg command line switch on the IDL command you are using
and pass it that way.

Inside your program, you can recover the command line argument
(or arguments) using the function COMMAND_LINE_ARGS.

See the on-line help for "command line switches" for details.

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Idea for an IDL numerical toolbox
Next Topic: FTP problem in IDLnetURL method SetProperty

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

Current Time: Sat Oct 11 14:29:46 PDT 2025

Total time taken to generate the page: 1.12159 seconds