Next: GETCWD, Previous: GET_COMMAND, Up: Intrinsic Procedures
GET_COMMAND_ARGUMENT — Get command line argumentsCALL GET_COMMAND_ARGUMENT(N, ARG)
     | N | Shall be of type INTEGER(4), N \geq 0 | 
| ARG | Shall be of type CHARACTER(*). | 
GET_COMMAND_ARGUMENT returns, the ARG argument holds the
Nth command line argument. If ARG can not hold the argument, it is
truncated to fit the length of ARG. If there are less than N
arguments specified at the command line, ARG will be filled with blanks. 
If N = 0, ARG is set to the name of the program (on systems
that support this feature).
               PROGRAM test_get_command_argument
            INTEGER :: i
            CHARACTER(len=32) :: arg
          
            i = 0
            DO
              CALL get_command_argument(i, arg)
              IF (LEN_TRIM(arg) == 0) EXIT
          
              WRITE (*,*) TRIM(arg)
              i = i+1
            END DO
          END PROGRAM