Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
as the comment was saying, that was unsafe, and flang was doing something else
[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   if (args.eq.'') STOP 2
12   I = 1
13   CALL GETARG(I,ARGS)
14   if (args.ne.'a') STOP 3
15   I = -1
16   CALL GETARG(I,ARGS)
17   if (args.ne.'') STOP 4
18   ! Assume we won't have been called with more that 4 args.
19   I = 4
20   CALL GETARG(I,ARGS)
21   if (args.ne.'') STOP 5
22   I = 1000
23   CALL GETARG(I,ARGS)
24   if (args.ne.'') STOP 6
25 end