To: J3 J3/10-124 From: John Reid Subject: Editorial corrections re inclusive scope Date: 2010 February 13 References: 09-303r2, 09-007r3 This paper suggests some changes to the edits in 09-303r2. 1. Change the edit [15:36+] Insert new definitions "1.3.115.1 <> scoping unit that is a BLOCK construct 1.3.115.2 <> scoping unit including any BLOCK construct whose host is that scoping unit or whose host is another BLOCK construct in the inclusive scope Note 1.4a That is, inclusive scope is the scope as if BLOCK constructs were not scoping units.". to [15:36+] Insert new definitions "1.3.115.1 <> scoping unit of a BLOCK construct 1.3.115.2 <> scoping unit plus every block scoping unit whose host is that scoping unit or that is nested within such a block scoping unit Note 1.4a That is, inclusive scope is the scope as if BLOCK constructs were not scoping units.". Reasons: The definitions are incorrect since a BLOCK construct and its scoping unit are not always the same. The second definition is clearer without using recursion. 2. In the edit for [172:9+] 8.1.4 BLOCK construct, end of subclause, Change "A global SAVE does not affect variables local to a BLOCK construct, because it is a scoping unit. For example," to "A SAVE statement outside a BLOCK construct does not affect variables local to the BLOCK construct, because a SAVE statement affects variables in its scoping unit rather than in its inclusive scope. For example," Reason: A BLOCK construct and its scoping unit are not always the same. The reader needs to be reminded that SAVE is defined to refer to the scoping unit. 3. Change the edit [186:15] 8.2.1 Branch concepts, p1, "same scoping unit" -> "same inclusive scope". to [186:15] 8.2.1 Branch concepts, p1, "in a scoping unit ... same scoping unit" -> "to a labeled branch target statement in the same inclusive scope". Reason: Clearer since only inclusive scope is involved here. 4. Change the edits [441:5] After "program (2.2.2)" insert "excluding any nested construct that has a construct entity with the same identifier". [441:6] Change "scope of a scoping unit (2.2)" to "inclusive scope, excluding any nested construct that has a construct entity with the same identifier". [441:7] After "scope of a construct (7.2.4, 8.1)" insert "excluding any nested construct that has a construct entity with the same identifier". to [441:5-7] Change the first three bullet points to "o A global identifier has a scope of a program (2.2.2) excluding the inclusive scope of any nested construct that has a construct entity with the same identifier; o A local identifier has a scope of an inclusive scope excluding the inclusive scope of any nested construct that has a construct entity with the same identifier; o An identifier of a construct entity has a scope of the inclusive scope of the construct (7.2.4, 8.1) excluding the inclusive scope of any nested construct that has a construct entity with the same identifier;" or [441:5-8] Replace bulleted list by " The scope of "o a global identifier is a program (2.2.2) excluding the inclusive scope of any nested construct that has a construct entity with the same identifier; o a local identifier is an inclusive scope excluding the inclusive scope of any nested construct that has a construct entity with the same identifier; o an identifier of a construct entity is the inclusive scope of the construct (7.2.4, 8.1) excluding the inclusive scope of any nested construct that has a construct entity with the same identifier; o an identifier of a statement entity is a statement or part of a statement (3.3)" Reasons: Except for the program in the first bullet, it is always inclusive scope that is involved. The alternative is just wordsmithing to avoid the awkward "scope of an inclusive scope". 5. Change the edit [443:1] p4, Replace "in a scoping unit" With "in an inclusive scope excluding any nested construct that has a construct entity with the same identifier,". to [443:1-2] p4, Replace "scoping unit" by "scope", twice. Reason: Having defined scope in 16.1, there is no need to repeat it here. Note that this change is made five times on page 445. 6. Add the edits [11:44] In 1.3.82 interface body, change "scoping unit that" to "{interface-body};". Reason: An interface body and its scoping unit are not always the same. [20:18] In 1.3.143.1 local variable, delete "or BLOCK construct" and "or construct". Reason: Not needed any more. [101:12] In 5.3.16 SAVE attribute, end of para 4, add "of" before "a main program". Reason: A main program and its scoping unit are not always the same. Similarly for a module or submodule. [215:9] In 9.6.2.5 ASYNCHRONOUS= specifier in a data transfer statement, para 4, "scoping unit" -> "inclusive scope". Reason: For other implicit things we now have inclusive scope, so this seems appropriate here.