idl -vm and args / full idl and args [message #74784] |
Wed, 02 February 2011 05:04 |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Hi
I am looking for an easy way to handle parameters for vm and full idl.
My current idea is:
pro example, lat, lon, n
name = "example"
args = command_line_args(count=nparams)
parameters = routine_info(strlowcase(name), /parameters)
if nparams eq n_elements(parameters.args) then $
for i=0, n_elements(parameters.args)-1 do $
void = routine_names(parameters.args[i], args[i],
STORE=ROUTINE_NAMES(/LEVEL))
help, lat, lon, n
end
and calling it compiled:
idl > idl -vm='./example.sav' -args "1" "2" "3"
IDL Version 8.0 (linux x86_64 m64). (c) 2010, ITT Visual Information
Solutions
LAT STRING = '1'
LON STRING = '2'
N STRING = '3'
I remember that there is a flag which can be used to find out if the
program is executed in runtime or not, but i can't remember. Which is it?
Also I want to avoid to enter the name into each of the programs as
name. How can that be solved?
Later on I will add that sequence as a journal (@iknow).
cheers
Reimar
|
|
|