12-153 To: J3 From: Robert Corbett Subject: Interp request: function references in DATA statements Date: 2012 June 11 ---------------------------------------------------------------- NUMBER: F08/???? TITLE: function references as variables in DATA statements KEYWORDS: function, reference, DATA DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: The Fortran 2008 standard extended the syntax of variables to allow references to functions to be variables (6.2, 117:13,15). Because of that extension, a function reference may appear as a /data-stmt-object/ (5.4.7, 104:15). For example, the program PROGRAM DATA REAL, TARGET :: X DATA PF()/1.0/ CONTAINS FUNCTION PF() REAL, POINTER :: PF PF => X END FUNCTION END satisfies the syntax rules and constraints of Fortran 2008. Was this intended? ANSWER: References to function were not intended to be allowed as /data-stmt-object/s. An edit is supplied to correct this oversight. EDIT: [5.4.7, 104:26-27] Replace "In a /variable/ that is a /data-stmt-object/, each subscript, section subscript, substring starting point and substring ending point shall" with "A /variable/ that is a /data-stmt-object/ shall be a /designator/, not an /expr./ Each subscript, section subscript, substring starting point, and substring ending point in the /variable/ shall" SUBMITTED BY: Robert Corbett HISTORY: 12-xxx m198 Submitted