Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't free there for intel compiler, it breaks.
[simgrid.git] / teshsuite / smpi / fort_args / fort_args.f90
1 ! Check that getarg does somethig sensible.
2 program getarg_1
3   CHARACTER*10 ARGS, ARGS2
4   INTEGER*4 I
5   INTEGER*2 I2
6   I = 0
7   CALL GETARG(I,ARGS)
8   ! This should return the invoking command.  The actual value depends 
9   ! on the OS, but a blank string is wrong no matter what.
10   ! ??? What about deep embedded systems?
11
12   I2 = 0
13   CALL GETARG(I2,ARGS2)
14   if (args2.ne.args) STOP 1
15
16   if (args.eq.'') STOP 2
17   I = 1
18   CALL GETARG(I,ARGS)
19   if (args.ne.'a') STOP 3
20   I = -1
21   CALL GETARG(I,ARGS)
22   if (args.ne.'') STOP 4
23   ! Assume we won't have been called with more that 4 args.
24   I = 4
25   CALL GETARG(I,ARGS)
26   if (args.ne.'') STOP 5
27   I = 1000
28   CALL GETARG(I,ARGS)
29   if (args.ne.'') STOP 6
30 end