12-107 To: J3 From: Van Snyder Subject: Future Feature Request Date: 2012 January 19 Feature ------- 7.1.11p5 in 10-007r1 prohibits a specification function from being an internal function, and from having a dummy procedure argument. It would be sufficient to prohibit evaluation of a specification expression from invoking a procedure internal to the same instance of the subprogram in which the specification expression is evaluated. The prohibition in 7.1.11p5 in 10-007r1 against a specification function having a dummy procedure argument is pointless, because it does not prohibit it from having an argument of a type that has a procedure pointer component, or a type with a type-bound procedure that has a dummy procedure argument. The procedure pointer component, or the argument of the type bound procedure, could designate an internal procedure. The assertion in Note 7.32 that prohibiting a specification function from being an internal function ensures that they cannot inquire, via host association, about other objects being declared in the same is true, but pointless, since there are ways to invoke an internal procedure, by way of a specification function, that could in principle inquire or reference such variables. Proposed Edits to 10-007r1 -------------------------- [10-007r1:150:29 7.1.11p2(11)] Insert "data" before "argument". [10-007r1:150:44-45 7.1.11p5] Replace the paragraph by "A function is a specification function if it is a pure function, \obs{is not a statement function,} and is not a standard intrinsic function." [10-007r1:7.1.11p6 151:1-2] Insert ", or an instance of one that is internal to the same instance in which the specification expression is evaluated," after "subprogram". [10-007r1:7.1.11 Note 7.32 151:2+4-5] Replace "they not be internal ensures that they cannot" by "evaluation of a specification expression not invoke a procedure internal to the instance of the subprogram in which it appears ensures that it is not possible to" Alternative Edits to 10-007r1 ----------------------------- [10-007r1:150:29 7.1.11p2(11)] Insert "data" before "argument". [10-007r1:150:44-45 7.1.11p5] Replace the paragraph by "A function is a specification function if it is a pure function, \obs{is not a statement function,} and is not a standard intrinsic function." [10-007r1:7.1.11p6 151:2] Append before the end of the sentence ", and shall not reference or inquire about an automatic variable whose declaration contains the specification expression, or one declared after the appearance of the specification expression and within the same instance of the in which the specification expression appears". [10-007r1:7.1.11 Note 7.32 151:2+4-6] Delete the sentence that begins with "The requirement that they not be internal...."