blob: 2d566862d2d7aff70e4b3ce58e71921ac85de8a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
! Check that getarg does somethig sensible.
program getarg_1
CHARACTER*10 ARGS
INTEGER*4 I
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.'') call abort
I = 1
CALL GETARG(I,ARGS)
if (args.ne.'') call abort
I = -1
CALL GETARG(I,ARGS)
if (args.ne.'') call abort
! Assume we won't have been called with more that 4 args.
I = 4
CALL GETARG(I,ARGS)
if (args.ne.'') call abort
I = 1000
CALL GETARG(I,ARGS)
if (args.ne.'') call abort
end
|