J3/00-326 To: J3 From: Malcolm Cohen Subject: Issue 272 Date: 27 November 2000 1. Introduction Issue 272 says "It ought to be possible to assign a procedure to a procedure pointer with explicit interface from within itself." I disagree that this should always be possible. Within a procedure, the result variable name should always refer to the result variable, never to the procedure itself. 2. Proposal 2.1 Specifications and Syntax That a non-RECURSIVE procedure should be able to assign "itself" to a procedure pointer (when there is no possible confusion between it and the result variable). The same syntax to be used as if it were a RECURSIVE procedure. 2.2 Discussion Arguments for and against: - unlike passing itself as an actual argument, assignment to a procedure pointer can be useful - it would be irregular to require the RECURSIVE keyword when no recursion is being involved - the functionality is already available, but only clumsily, by using a "helper" procedure. - it may be inconvenient (or impossible) to make the procedure RECURSIVE, due to external constraints. 3. Edits to 00-007r3 [245:8] Delete "recursive" twice. {Remove the RECURSIVE keyword requirement - makes the procedure interface explicit.} [245:13-21] Delete J3 note 272. [267:24] Change "are recursive function references" to "refer to the function itself". {Not all occurrences of the function name are function references: in particular, appearance on the right-hand-side of a procedure pointer assignment is not.} [269:10] Change "If RECURSIVE is specified, the" to "The". {There is no need to invoke recursion just to make the interface explicit.} [270:14-15] Delete "and RECURSIVE is specified in the FUNCTION statement". {No need for recursion.} [270:20] Replace "If RECURSIVE ... , the" by "The" {No need for recursion.} [270:20] Replace "the subroutine" by "a subroutine". {Wording improvement.} ===END