Showing changes from revision #2 to #3:
Added | Removed | Changed
Retrieve the entire command line that was used to invoke the program.
Fortran 2003 and later
Subroutine
call get_command(command)
call get_command([command, length, status])
command -character and of default kind.length - (Optional) Shall be of type integer and of default kind.status - (Optional) Shall be of type integer and of default kind. Stores If the entire command line that was used to invoke the program incommand . If is present, stores the entire command line that was used to invoke the program incommand . is If not large enough, the command will be truncated.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
get_command_argument, command_argument_count