Retrieve the entire command line that was used to invoke the program.
Fortran 2003 and later
CALL GET_COMMAND([COMMAND, LENGTH, STATUS])
|COMMAND||(Optional) shall be of type
|LENGTH||(Optional) Shall be of type
|STATUS||(Optional) Shall be of type
If COMMAND is present, stores the entire command line that was used to invoke the program in COMMAND. If LENGTH is present, it is assigned the length of the command line. If STATUS is present, it is assigned 0 upon success of the command, -1 if COMMAND is too short to store the command line, or a positive value in case of an error.
PROGRAM test_get_command CHARACTER(len=255) :: cmd CALL get_command(cmd) WRITE (*,*) TRIM(cmd) END PROGRAM
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.