3 ! PR 78661: [OOP] Namelist output missing object designator under DTIO
5 ! Contributed by Ian Harvey <ian_harvey@bigpond.com>
12 PROCEDURE
:: write_formatted
13 GENERIC
:: WRITE(FORMATTED
) => write_formatted
14 PROCEDURE
:: read_formatted
15 GENERIC
:: READ(FORMATTED
) => read_formatted
18 SUBROUTINE write_formatted(dtv
, unit
, iotype
, v_list
, iostat
, iomsg
)
19 CLASS(t
), INTENT(IN
) :: dtv
20 INTEGER, INTENT(IN
) :: unit
21 CHARACTER(*), INTENT(IN
) :: iotype
22 INTEGER, INTENT(IN
) :: v_list(:)
23 INTEGER, INTENT(OUT
) :: iostat
24 CHARACTER(*), INTENT(INOUT
) :: iomsg
25 WRITE (unit
, "(A)", IOSTAT
=iostat
, IOMSG
=iomsg
) dtv
%c
27 SUBROUTINE read_formatted(dtv
, unit
, iotype
, v_list
, iostat
, iomsg
)
28 CLASS(t
), INTENT(INOUT
) :: dtv
29 INTEGER, INTENT(IN
) :: unit
30 CHARACTER(*), INTENT(IN
) :: iotype
31 INTEGER, INTENT(IN
) :: v_list(:)
32 INTEGER, INTENT(OUT
) :: iostat
33 CHARACTER(*), INTENT(INOUT
) :: iomsg
34 READ (unit
, "(A)", IOSTAT
=iostat
, IOMSG
=iomsg
) dtv
%c
43 character(len
=4), dimension(3) :: buffer
54 if (buffer(2) /= " X=a") call abort()
58 class(t
), allocatable
:: y
62 if (buffer(2) /= " Y=b") call abort()