File: TestF77CmdLine.f

package info (click to toggle)
plplot 5.9.0-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 26,256 kB
  • ctags: 9,353
  • sloc: ansic: 64,079; xml: 22,799; cpp: 8,562; tcl: 8,314; perl: 4,872; python: 4,462; f90: 4,310; java: 4,090; sh: 1,481; makefile: 261; php: 102; fortran: 59; sed: 5
file content (21 lines) | stat: -rw-r--r-- 734 bytes parent folder | download
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(1)
      else
        call exit(0)
      endif
      stop
      end