Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.

  >  Docs Center  >  IDL Reference  >  Programming and Control  >  COMMAND_LINE_ARGS



The COMMAND_LINE_ARGS function returns strings supplied by the user when IDL was started with the -arg or -args command line options. If either of these options is specified at the command line when IDL is started, IDL saves them without examining their values or attaching any special meaning to them.

Note: The shell performs its normal interpretation of wildcards and shell metacharacters before the values of the -arg or -args command line options are passed to IDL.

Strings specified at the command line can be retrieved at any time within the IDL session via the COMMAND_LINE_ARGS function. This mechanism can be used to pass special application-defined values to a program written in the IDL language.


Result = COMMAND_LINE_ARGS( [COUNT=variable] )

Return Value

If any -arg or -args options were specified at the command line when IDL was started, COMMAND_LINE_ARGS returns a string array containing the specified values, one value per element. The values are returned in the order specified by the user on the command line. If no such options were specified, a NULL scalar string is returned.



Set this keyword equal to a named variable that will contain the number of retrieved arguments. If no arguments were specified, the variable will contain 0.

Version History



See Also

Starting IDL

© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us