File: TestF77CmdLine.f

package info (click to toggle)
plplot 5.9.5-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 32,964 kB
  • ctags: 11,898
  • sloc: ansic: 71,866; xml: 25,294; cpp: 13,070; tcl: 10,310; f90: 5,963; perl: 5,661; python: 5,068; java: 4,944; ml: 4,057; sh: 1,754; php: 267; makefile: 198; lisp: 75; fortran: 64; sed: 5
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