IDL

COMMAND_LINE_ARGS

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.

Syntax


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.

Keywords


COUNT

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


6.2

Introduced

See Also


Starting IDL


This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.
© 2017 Exelis Visual Information Solutions, Inc., a subsidiary of Harris Corporation