2 !{ dg-options "-std=legacy" }
4 ! Tests character delimiters for namelist write
5 ! provided by Paul Thomas - pault@gcc.gnu.org
8 character*3 :: ch
= "foo"
12 open (10, status
= "scratch")
15 read (10, '(a)', iostat
= ier
) buffer
16 read (10, '(a)', iostat
= ier
) buffer
17 if (ier
.ne
. 0) call abort ()
19 If ((buffer(6:6) /= "f") .or
. (buffer(9:9) /= """")) call abort ()
21 open (10, status
= "scratch", delim
="quote")
24 read (10, '(a)', iostat
= ier
) buffer
25 read (10, '(a)', iostat
= ier
) buffer
26 if (ier
.ne
. 0) call abort ()
28 If ((buffer(5:5) /= """") .or
. (buffer(9:9) /= """")) call abort ()
30 open (10, status
= "scratch", delim
="apostrophe")
33 read (10, '(a)', iostat
= ier
) buffer
34 read (10, '(a)', iostat
= ier
) buffer
35 if (ier
.ne
. 0) call abort ()
37 If ((buffer(5:5) /= "'") .or
. (buffer(9:9) /= "'")) call abort ()
39 end program namelist_18