08-176 To: J3 From: Malcolm Cohen Subject: Interp F03/0082 Date: 2008 May 13 1. Introduction =============== After reviewing this failed interpretation, I came to the conclusion that I agree that we did not make a conscious decision to require VALUE arguments to have specified intent (i.e. INTENT(IN)) for pure procedures. However, I also think that status quo of requiring VALUE dummy arguments to have INTENT(IN) for pure procedures does not remove any significant functionality. Furthermore, the edits that would be required to lift the restriction are not quite trivial. Therefore I conclude that we should probably answer this interpretation in the negative, i.e. with no edits. It would be a good idea to reconsider this for F2008, perhaps as a Public Comment. The only bad thing about this restriction that I can see is that it doesn't make any sense (it does not help anyone) so removing it from the standard makes the language design more consistent. I append a second attempt at getting the edits for lifting this restriction, as an interp to F2003, in case the committee think that we should pursue that route. 2. Revised Interpretation ========================= ---------------------------------------------------------------------- NUMBER: F03/0082 TITLE: VALUE in place of INTENT for pure procedure dummy arguments KEYWORDS: VALUE, INTENT, PURE DEFECT TYPE: Interpretation STATUS: J3 consideration in progress QUESTION: C1266 requires all nonpointer dummy arguments of a pure function to be data objects that have INTENT(IN). C1267 requires all dummy arguments of a pure subroutine to have specified intents. Was it intended that VALUE not be allowed in place of INTENT(IN), that is, was it intended that if a dummy argument of a pure procedure has the VALUE attribute, it is nonetheless also required to have the INTENT(IN) attribute explicitly specified? ANSWER: The possible extension of the VALUE attribute to allow omission of the INTENT(IN) attribute in the specific case of pure procedures was not considered during the development of Fortran 2003. However, the standard is consistent and not in error, and so this restriction should remain. EDITS: None. SUBMITTED BY: Van Snyder HISTORY: 06-153 m176 F03/0082 Submitted, fix edit, needs more 08-176 m184 Reversed answer + revised alternative edits ---------------------------------------------------------------------- 3. Alternative ANSWER and EDITS =============================== ANSWER: It was an oversight that VALUE is not allowed to stand on its own. Edits are provided to allow its omission, and consequently the assignment to VALUE dummy arguments of a pure procedure that do not have INTENT(IN). EDITS: [286:12] Change "INTENT(IN)" To "have the INTENT(IN) or VALUE attribute". {Allow VALUE on its own in a pure function subprogram.} [286:14] After "dummy data objects" Append "that do not have the VALUE attribute". {Allow VALUE on its own in a pure subroutine subprogram.} [286:24] After "is a dummy argument of a pure function" Insert "that does not have the VALUE attribute". {Allow assignment to VALUE dummies in a pure function; the above phrase might look ambiguous but is not because functions cannot have the VALUE attribute.} ===END===