COMMAND_ARGUMENT_COUNT (The GNU Fortran Compiler)

### 8.72 `COMMAND_ARGUMENT_COUNT` — Get number of command line arguments ¶

Synopsis:

  `RESULT = COMMAND_ARGUMENT_COUNT()`

Description:

  `COMMAND_ARGUMENT_COUNT` returns the number of arguments passed on the command line when the containing program was invoked.

Class:

  Inquiry function

Arguments:

  None

Return value:

  The return value is an `INTEGER` of default kind.

Example:

      program test_command_argument_count
          integer :: count
          count = command_argument_count()
          print *, count
      end program test_command_argument_count

Standard:

  Fortran 2003 and later

See also:

  `GET_COMMAND` — Get the entire command line,
  `GET_COMMAND_ARGUMENT` — Get command line arguments