12-149r1 To: J3 Subject: Interpretation concerning L-value functions From: Malcolm Cohen Date: 2012 June 27 ---------------------------------------------------------------------- NUMBER: F08/0075 TITLE: Pointer function reference as variable in assignment KEYWORDS: Pointer function, assignment, defined operator 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 integer, pointer :: Unary ... end function Unary function Binary ( Arg1, Arg2 ) integer, intent(in) :: Arg1, Arg2 integer, pointer :: Binary ... end function Binary end module Funcs program What use Funcs integer :: X, Y = 42 10 .op. x = y end program What Is the "10" in "10 .op. x = y" an operand, and therefore an argument of a reference to Binary, or is .op. a reference to Unary and "10" a statement label? 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. An edit is supplied to clarify. EDITS: [45:7] 3.3.1p1 append new sentence "The first nonblank character of a statement that is not part of a statement shall not be a digit." SUBMITTED BY: Van Snyder HISTORY: 12-149 m198 F08/0075 submitted 12-149r1 m198 Revised edit. ----------------------------------------------------------------------