File: fort_args.f90

package info (click to toggle)
simgrid 3.21%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 21,972 kB
  • sloc: cpp: 88,193; ansic: 69,244; fortran: 6,089; f90: 5,162; xml: 4,861; java: 4,250; perl: 2,056; python: 1,193; sh: 1,159; makefile: 57; sed: 6
file content (25 lines) | stat: -rw-r--r-- 634 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
22
23
24
25
! Check that getarg does somethig sensible.
program getarg_1
  CHARACTER*10 ARGS, ARGS2
  INTEGER*4 I
  INTEGER*2 I2
  I = 0
  CALL GETARG(I,ARGS)
  ! This should return the invoking command.  The actual value depends 
  ! on the OS, but a blank string is wrong no matter what.
  ! ??? What about deep embedded systems?
  if (args.eq.'') STOP 2
  I = 1
  CALL GETARG(I,ARGS)
  if (args.ne.'a') STOP 3
  I = -1
  CALL GETARG(I,ARGS)
  if (args.ne.'') STOP 4
  ! Assume we won't have been called with more that 4 args.
  I = 4
  CALL GETARG(I,ARGS)
  if (args.ne.'') STOP 5
  I = 1000
  CALL GETARG(I,ARGS)
  if (args.ne.'') STOP 6
end