man(1) Manual page archive


     GETARG(3F)                                             GETARG(3F)

     NAME
          getarg, iargc - command arguments to Fortran

     SYNOPSIS
          subroutine getarg(argno, string)
          integer argno
          character *(*) string

          iargc()

     DESCRIPTION
          These procedures permit Fortran programs to access the com-
          mand arguments.  The integer function iargc returns the num-
          ber of command arguments.  The subroutine getarg stores the
          argnoth command argument in its second argument.  The string
          is truncated or padded with blanks, in accord with the rules
          of Fortran character assignment.

          The command
                 a.out arg1 argument2
          provides 2 as the value of iargc. If s is declared charac-
          ter*4, then
                call getarg(2, s)
          will put `arg1' in s.

     SEE ALSO
          exec(2)