To: J3 J3/12-150 Subject: Interpretation concerning L-value functions From: Van Snyder Date: 2012 May 16 ---------------------------------------------------------------------- NUMBER: TBD TITLE: L-value functions in assignment KEYWORDS: L-value functions, pointer, READ statement, defined operators DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Consider the following module Funcs interface operator ( .op. ) module procedure Unary, Binary end interface contains function Unary ( Arg ) integer, intent(in) :: Arg character(len=...), pointer :: Unary ... end function Unary function Binary ( Arg1, Arg2 ) integer, intent(in) :: Arg1, Arg2 character(len=...), pointer :: Binary ... end function Binary end module Funcs program What use Funcs integer :: X = 42, Y read (10) .op. x, y end program What Is "10" an , or is "(10) .op. x" a ? ANSWER: It was an oversight that this ambiguous program conforms to the syntax and constraints in two different ways. Since the standard does not establish an unique interpretation, it is not a conforming program. EDITS: none. OR Insert a constraint after R910 in subclause 9.6.1: C909a (R910) If is ( ) and appears, there shall not be an accessible interface block with a consisting of OPERATOR ( ) in which the specifies a function having one argument. ALTERNATIVE ANSWER: It was an oversight that this ambiguous program conforms to the syntax and constraints in two different ways. Since the standard does not establish an unique interpretation, it is not a conforming program. That this program is ambiguous was caused by an oversight to allow a to consist of , in which is a reference, as a defined operation, to a function that has a data pointer result. ALTERNATIVE EDITS: Replace R602 and C602 in subclause 6.2 by R602 <> <> C602 (R602) shall be a reference to a function that has a data pointer result. {Notice that this also precludes using a function referenced by way of a defined operation in otherwise harmless contexts, such as an actual argument that corresponds to a dummy argument that is not INTENT(in).} SUBMITTED BY: Van Snyder HISTORY: 12-150 m198 F08/xxxx submitted