Author(s): F. Carminati, M. Marquina | Library: KERNLIB or Fortran Run-Time Library |
Submitter: | Submitted: 13.07.1988 |
Language: Fortran + C | Revised: 15.03.1993 |
IARGC is used to return arguments that the user has given to an executable module on the command line.
Structure:
FUNCTION subprograms
User Entry Names: GETARG, IARGC
Usage:
NPAR = IARGC()sets NPAR to the number of blank delimited arguments present after the program name on the command line. NPAR and IARGC are of type INTEGER.
CALL GETARG(IARG,GOTEXT)
Notes:
"a variable here"is equivalent to one argument.
Example:
CHARACTER*100 STRING C C-- Retrieve the number of arguments given to this program C NPAR=IARGC() C-- and then get one by one, storing it in STRING DO 10 N = 1,NPAR CALL GETARG(N,STRING) PRINT *, STRING(1:LENOCC(STRING)) 10 CONTINUE END