GET_COMMAND — Get the entire command line#
- 
GET_COMMAND(COMMAND, LENGTH, STATUS)#
- Retrieve the entire command line that was used to invoke the program. - Parameters:
- COMMAND – (Optional) shall be of type - CHARACTERand of default kind.
- LENGTH – (Optional) Shall be of type - INTEGERand of default kind.
- STATUS – (Optional) Shall be of type - INTEGERand of default kind.
 
- Returns:
- If - COMMANDis present, stores the entire command line that was used to invoke the program in- COMMAND. If- LENGTHis present, it is assigned the length of the command line. If- STATUSis present, it is assigned 0 upon success of the command, -1 if- COMMANDis too short to store the command line, or a positive value in case of an error.
 - Standard:
- Fortran 2003 and later 
- Class:
- Subroutine 
- Syntax:
- CALL GET_COMMAND([COMMAND, LENGTH, STATUS]) 
- Example:
- PROGRAM test_get_command CHARACTER(len=255) :: cmd CALL get_command(cmd) WRITE (*,*) TRIM(cmd) END PROGRAM 
- See also:
- GET_COMMAND_ARGUMENT — Get command line arguments, COMMAND_ARGUMENT_COUNT — Get number of command line arguments