2 ! PR47778 Reading array of structures from namelist
3 ! Test case derived from the reporters test case.
9 type (field_descr
), dimension(3) :: vel
! 3 velocity components
10 type (field_descr
), dimension(3) :: scal
! 3 scalars
12 type (fsetup
) field_setup
13 namelist /nl_setup
/ field_setup
14 field_setup
%vel
%number
= 0
15 field_setup
%scal
%number
= 0
16 ! write(*,nml=nl_setup)
17 open(10, status
="scratch")
18 write(10,'(a)') "&nl_setup"
19 write(10,'(a)') " field_setup%vel(1)%number= 3,"
20 write(10,'(a)') " field_setup%vel(2)%number= 9,"
21 write(10,'(a)') " field_setup%vel(3)%number= 27,"
22 write(10,'(a)') " field_setup%scal(1)%number= 2,"
23 write(10,'(a)') " field_setup%scal(2)%number= 4,"
24 write(10,'(a)') " field_setup%scal(3)%number= 8,"
28 if (field_setup
%vel(1)%number
.ne
. 3) STOP 1
29 if (field_setup
%vel(2)%number
.ne
. 9) STOP 2
30 if (field_setup
%vel(3)%number
.ne
. 27) STOP 3
31 if (field_setup
%scal(1)%number
.ne
. 2) STOP 4
32 if (field_setup
%scal(2)%number
.ne
. 4) STOP 5
33 if (field_setup
%scal(3)%number
.ne
. 8) STOP 6
34 !write(*,nml=nl_setup)