To: J3 J3/20-153 From: Robert Corbett Subject: ambiguous READ References: 20-007 Date: 2020-October-12 The statement READ (CVAR) where CVAR is a default character variable is syntactically ambiguous. Under the syntax rules, it might be a input statement that designates an internal file, or it might be a formatted input statement that reads from the default input unit. If the statement is interpreted as an input statement that reads from an internal file, it is not standard conformant. Paragraph 2 of subclause 12.6.4.3 "Identifying a unit" of 20-007 states The unit identified by an unformatted data transfer statement shall be an external unit. The interpretation of the statement as a formatted input statement has no such problem. For the sake of resolving the syntactic ambiguity, the restriction given in subclause 12.6.4.3 should be promoted to a constraint. Edits to that effect are supplied. EDITS to 20-007: [12.6.1 "Form of input and output statements" p1+, page:9-] Following Note 1, insert the new note "Note 2 A statement of the form READ (\su{name}) where \su{name} is the name of a default character variable is a formatted input statement. It cannot be an input statement that specifies an internal file because of C1219a." [12.6.2.1 "Syntax" p1+, page 233:13+] Insert "C1219a (R1213) If \si{io-unit} is an \si{internal-file-variable}, the \si{io-control-spec-list} shall contain a \s1{format} or a \si{namelist-group-name}.