2 ! Tests namelist on complex variables
3 ! provided by Paul Thomas - pault@gcc.gnu.org
5 complex(kind
=8), dimension(2) :: z
7 z
= (/(1.0,2.0), (3.0,4.0)/)
9 open (10, status
= "scratch")
10 write (10, '(A)') "&mynml z(1)=(5.,6.) z(2)=(7.,8.) /"
13 read (10, mynml
, iostat
= ier
)
14 if (ier
.ne
. 0) call abort ()
17 open (10, status
= "scratch")
18 write (10, mynml
, iostat
= ier
)
19 if (ier
.ne
. 0) call abort ()
22 z
= (/(1.0,2.0), (3.0,4.0)/)
23 read (10, mynml
, iostat
= ier
)
24 if (ier
.ne
. 0) call abort ()
27 if ((z(1) .ne
. (5.0,6.0)) .or
. (z(2) .ne
. (7.0,8.0))) call abort ()
29 end program namelist_16