Re: run .sav file with -args [message #73650 is a reply to message #73511] |
Mon, 15 November 2010 08:53  |
Truong Le
Messages: 42 Registered: September 2010
|
Member |
|
|
On Nov 14, 8:42 pm, Truong Le <truong...@gmail.com> wrote:
> On Nov 14, 8:28 pm, David Fanning <n...@dfanning.com> wrote:
>
>
>
>> Truong Le writes:
>>> It complains that the sayhello.sav function/procedure is undefined
>>> but the sayhello.sav file does exist. Please let me know if the way I
>>> execute my
>>> procedure using the .sav file is correct.
>
>> Have you tried specifying the complete path to the file?
>
>> 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.")
>
> when I type
>
> idl sayhello.sav -args param1 param2
>
> there is a directory widget the pop-up which allows me to select the
> sayhello.sav,
> so I am sure the path is correct.
I read other posting and realize that I can't run the .sav file with -
args.
Here is an example what I try to accomplish.
I have a procedure that takes command line arguments as follow:
pro test
; parse the parameters
numArgs = 2
par = COMMAND_LINE_ARGS(COUNT=numArgs)
print, par[0]
print, par[1]
end
when I ran this procedure from the dos command line using idlde by
doing
idlde -args hello hi
and execute the test procedure it print both "hello" and "hi"
I ran the idlde build project and this creates a test.sav file
I need to know how I can execute idl -vm = test.sav from the unix and
passing
in the two arguments that I need. Is this task not possible?
Thanks
|
|
|