2 ! Tests namelist io for an explicit shape array with negative bounds
3 ! provided by Paul Thomas - pault@gcc.gnu.org
6 integer, dimension (-4:-2) :: x
10 open (10, status
= "scratch")
11 write (10, '(A)') "&a x(-5)=0 /" !-ve index below lbound
12 write (10, '(A)') "&a x(-1)=0 /" !-ve index above ubound
13 write (10, '(A)') "&a x(1:2)=0 /" !+ve indices
14 write (10, '(A)') "&a x(-4:-2)= -4,-3,-2 /" !correct
19 read(10, a
, iostat
=ier
)
22 read(10, a
, iostat
=ier
)
25 read(10, a
, iostat
=ier
)
29 read(10, a
, iostat
=ier
)
35 end program namelist_20