2 c This program repeats many of the same tests as test_nml_1 but for integer instead of real.
3 c It also tests repeat nulls, comma delimited character read, a triplet qualifier, a range with
4 c and assumed start, a quote delimited string, a qualifier with an assumed end and a fully
5 c explicit range. It also tests that integers and characters are successfully read back by
7 c Provided by Paul Thomas - pault@gcc.gnu.org
14 character*10 ch
, check
15 namelist
/mynml
/ x
, xx
, ch
17 c set debug = 0 or 1 in the namelist! (line 33)
28 open
(10,status
="scratch")
29 write (10, *) "!mynml"
31 write (10, *) "&mynml x(7) =+99 x=1, 2 ,"
32 write (10, *) " 2*3, ,, 2* !comment"
33 write (10, *) " 9 ch=qqqdefghqq , x(8:7:-1) = 8 , 7"
34 write (10, *) " ch(:3) =""abc"","
35 write (10, *) " ch(9:)='ij' x(4:5)=4 ,5 xx = 42/"
38 read (10, nml
=mynml
, IOSTAT
=ier
)
39 if (ier
.ne
.0) call abort
42 write (10, nml
=mynml
, iostat
=ier
)
43 if (ier
.ne
.0) call abort
46 read (10, NML
=mynml
, IOSTAT
=ier
)
47 if (ier
.ne
.0) call abort
51 if ( abs
( x
(i
) - i
) .ne
. 0 ) call abort
()
52 if ( ch
(i
:i
).ne
.check
(I
:I
) ) call abort
54 if (xx
.ne
.42) call abort
()