J3/05-171 Date: 25 Apr 2005 To: J3 From: Rob James Subject: Null input values and list-directed UDDTIO NUMBER: TITLE: Null input values and list-directed UDDTIO KEYWORDS: null value, UDDTIO DEFECT TYPE: STATUS: J3 consideration in progress QUESTION: Consider the following program: MODULE m PRIVATE TYPE, PUBLIC :: t INTEGER i INTEGER j CONTAINS PROCEDURE, PRIVATE :: readFormatted => readFormattedT GENERIC :: READ(FORMATTED) => readFormatted END TYPE CONTAINS SUBROUTINE readformattedT(dtv, unit, iotype, v_list, iostat, iomsg) CLASS(t), INTENT(INOUT) :: dtv INTEGER, INTENT(IN) :: unit CHARACTER(*), INTENT(IN) :: iotype INTEGER, INTENT(IN) :: v_list(:) INTEGER, INTENT(OUT) :: iostat CHARACTER(*), INTENT(INOUT) :: iomsg READ (unit, *) dtv%i READ (unit, *) dtv%j END SUBROUTINE END MODULE PROGRAM p USE m INTEGER i TYPE(t) x, y, z x%i = 10 x%j = 15 y%i = 20 y%j = 25 z%i = 30 z%j = 35 i = 100 READ (*,*) x, y, z, i PRINT *, x, y, z, i END PROGRAM The following is given as input to this program: 1044 2167 3977 / 1 2 3 10.9.1.1 of Fortran 2003 (Null values) states: A slash encountered as a value separator during execution of a list-directed input statement causes termination of execution of that input statement after the assignment of the previous value. If a child data transfer statement encounters a slash as a value separator, it is unclear whether this statement applies to just the child statement, or to the parent data transfer statement as well. The significance for any subsequent child statement is also unclear. What is the behaviour of this program when it is given the specified input? ANSWER: TBD. EDITS: TBD. SUBMITTED BY: Rob James HISTORY: 05-171 m172 Submitted