File: TestF77CmdLine.f

package info (click to toggle)
plplot 5.9.9-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 84,772 kB
  • sloc: ansic: 86,290; xml: 26,754; ada: 17,685; cpp: 15,530; php: 11,938; tcl: 11,125; ml: 6,825; perl: 6,736; f90: 6,709; python: 6,237; java: 6,215; sh: 2,042; makefile: 192; lisp: 75; fortran: 64; sed: 52
file content (21 lines) | stat: -rw-r--r-- 734 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
      implicit none
      character*100 command
      integer narg, iargc
c      get number of command-line arguments
      narg = iargc()
c      get command name.  Apparently this does not always give back the
c      command name on all systems, but all that is required for the
c      getarg(0 call by the interface logic is that a valid string is
c      returned.  (All we are really interested in is the subsequent
c      arguments.)
      call getarg(0, command)
      if(narg.gt.0) call getarg(1, command)
c     ran into one case (Cygwin) where under certain badly linked
c     circumstances, iargc() could return -1
      if(narg.lt.0) then
        call exit(0)
      else
        call exit(1)
      endif
      stop
      end