To: J3 J3/14-178 From: David Muxworthy Subject: UK proposal UK-16 INTENT(IN) and VALUE Date: 2014 June 09 Status: For Consideration Basic Functionality: Remove anomaly of INTENT(IN) and VALUE for generic interfaces Rationale: Constraint C1267 for pure procedures in F03 was "The specification-part of a pure subroutine subprogram shall specify the intents of all its nonpointer dummy data objects". In F08 this was changed to (C1277) "The specification-part of a pure subroutine subprogram shall specify the intents of all its nonpointer dummy data objects that do not have the VALUE attribute" but this change was not reflected in the description of generic interfaces. This leads to anomalies such as: PURE SUBROUTINE s(a,b) TYPE(t),INTENT(Out) :: a TYPE(t),VALUE :: b ... END SUBROUTINE is valid in itself, but INTERFACE ASSIGNMENT(=) MODULE PROCEDURE s END INTERFACE is not valid with that procedure. Similarly for a pure function that uses VALUE but not INTENT(IN), and OPERATOR(any operator). A similar situation relates to F03 constraint C1266 which was updated to C1276 in F08 so as not to require an intent if VALUE was specified, but C1205 was not updated correspondingly. Specification: Update the definition of arguments in generic interfaces and amend constraint C1205 to align it with C1276 in F08, which is now C1285 in 14-007r1. Syntax: No syntax change. Edits to J3/14-007r1(= N2014): [281:6] In 12.4.3.2 Interface block, before paragraph 1, in C1205, replace "and procedure arguments" by ", procedure arguments, and arguments that have the VALUE attribute". [285:6,7] In 12.4.3.4.2 Defined operations, para 1, lines 5-6, replace "shall be specified with INTENT (IN)" by "shall have the INTENT (IN) or VALUE attribute". [286:3] In 12.4.3.4.3 Defined assignments, para 2, line 3, replace "INTENT (IN)" by "the INTENT (IN) or VALUE attribute".