./
pp_command_line_args_parse.pro
Routines
top source pp_command_line_args_parse
result = pp_command_line_args_parse()
Parses arguments provided in the command line into a more usable form: simple arguments are provided as a list, in the order they were given in the command line. Additionally, some arguments are parsed into a hash:
1) -foo is parsed as a hash element with key foo and value 1
2) --foo=bar is parsed as a hash element with key foo and value bar
Examples
:
Suposing the IDL session was started as:
idl -args arg1 arg2 -key1 --key2=value1
args=pp_command_line_args_parse()
help,args
;** Structure <19a2d18>, 4 tags, length=16, data length=16, refs=1:
;ARGCOUNT LONG 2
;KEYCOUNT LONG 2
;ARGUMENTS OBJREF <ObjHeapVar75(LIST)>
;KEYWORDS OBJREF <ObjHeapVar73(HASH)>
print,args.arguments
;arg1
;arg2
print,args.keywords
;key1: 1
;key2: value1
Author information
- Author:
Paulo Penteado (http://www.ppenteado.net)
Statistics
Lines: | 35 lines |
Cyclomatic complexity: | 11 |
Modified cyclomatic complexity: | 10 |
File attributes
Modification date: | Tue May 16 12:42:15 2017 |
Lines: | 35 |
Docformat: | rst rst |