IARGC (The GNU Fortran Compiler)

### 8.146 `IARGC` — Get the number of command line arguments ¶

Synopsis:

  `RESULT = IARGC()`

Description:

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

  This intrinsic routine is provided for backwards compatibility with GNU Fortran 77. In new code, programmers should consider the use of the `COMMAND_ARGUMENT_COUNT` — Get number of command line arguments intrinsic defined by the Fortran 2003 standard.

Class:

  Function

Arguments:

  None

Return value:

  The number of command line arguments, type `INTEGER(4)`.

Example:

  See `GETARG` — Get command line arguments

Standard:

  GNU extension

See also:

  GNU Fortran 77 compatibility subroutine:
  `GETARG` — Get command line arguments
  Fortran 2003 functions and subroutines:
  `GET_COMMAND` — Get the entire command line,
  `GET_COMMAND_ARGUMENT` — Get command line arguments,
  `COMMAND_ARGUMENT_COUNT` — Get number of command line arguments