Intel® Fortran Compiler 16.0 User and Reference Guide
Intrinsic Subroutine: Returns a command line argument of the command that invoked the program. Intrinsic subroutines cannot be passed as actual arguments.
CALL GET_COMMAND_ARGUMENT (number[,value,length,status])
number |
(Input) Must be a scalar of type integer. It must be non-negative and less than or equal to the value returned by the COMMAND_ARGUMENT_COUNT function. Its value is the position of the command-line argument to retrieve. The command itself is argument number zero. |
value |
(Output; optional) Must be a scalar of type default character. If specified, its value is the returned command-line argument or all blanks if the value is unknown. |
length |
(Output; optional) Must be a scalar of type integer. If specified, its value is the length of the returned command-line argument or zero if the length of the argument is unknown. This length includes significant trailing blanks. It does not include any truncation or padding that occurs when the argument is assigned to the value argument. |
status |
(Output; optional) Must be a scalar of type integer. If specified, its value is the returned completion status. It is assigned the value -1 if the value argument is present and has a length less than the significant length of the command argument specified by number. It is assigned a processor-dependent positive value if the argument retrieval fails. Otherwise, it is assigned the value zero. |
GET_COMMAND_ARGUMENT returns command-line arguments as they were entered. There is no case conversion.
See the example in COMMAND_ARGUMENT_COUNT.