08-197 To: J3 From: Van Snyder Subject: with , but not a scoping unit Date: 2008 May 20 Reference: 08-007r2, 08-150 1. Introduction Allowing a specification part in a BLOCK construct but not in a wouldn't help processors and wouldn't improve the prospects that a program that uses construct-local variables will be correct. It would, however, require programmers to write the extra BLOCK ... END BLOCK where it appears not to be needed, and make them wonder "Why did J3 cripple this feature?" 08-150 proposed that if a were a scoping unit, it would be easier to explain by referring to host association, but Malcolm pointed out that this would be an incompatible change, because implicitly-declared variables wouldn't have procedure scope, and labels of format statements in blocks wouldn't be accessible outwith those blocks. Even if the concept isn't adopted, defining and using the term "elaboration of a specification part" as is done here might be useful. 2. Suggested changes [13: 2.1.29p2] --------------------------------------------------------- Editor: Replace "specification part of a BLOCK construct" by of a block". [21: 2.1.104.1] -------------------------------------------------------- Editor: Replace "BLOCK construct" by "block". [25: 2.1.122.1] -------------------------------------------------------- Editor: Replace "BLOCK construct" by "block" and replace the second "construct" by "block". [31: 2.4.5p1] ---------------------------------------------------------- Editor: After "is invoked" insert ", or a block is executed". After "invoked procedure" insert "or executed block". After "evaluated" insert "and any subcomponents of unsaved nonpointer nonallocatable local variables for which default initialization is specified are initialized". After "order." insert "This is called <> of the specification part." After "entry point" insert ", or of the block". [31: 2.4.5p1 item 3 in list] ------------------------------------------- Editor: Delete because it is covered by the revised 2.4.5p1. [34: 2.5.3.1.1p2] ------------------------------------------------------ Editor: Replace "BLOCK construct" by "block", replace the second "construct" by "block", and replace "constructs" by "blocks". [74: 4.5.6.3p3] -------------------------------------------------------- Editor: Replace "BLOCK construct" by "block" twice. [86: 5.2.2p2] ---------------------------------------------------------- It is better to do this once and for all for length parameters, bounds, and cobounds in 7.1.11. Editor: Delete 5.2.2p2. [90-91: 5.3.6.3p3] ----------------------------------------------------- It is better to do this once and for all for length parameters, bounds, and cobounds in 7.1.11. Editor: Delete 5.3.6.3p2. [92: 5.3.8.2p2] -------------------------------------------------------- It is better to do this once and for all for length parameters, bounds, and cobounds in 7.1.11. Editor: Delete 5.3.8.2p2. [98:5.3.16p2] ---------------------------------------------------------- Editor: Replace "BLOCK construct" by "block" twice. Replace "the construct" by "the block". [128: 6.6.3.2p3] ------------------------------------------------------- Editor: Replace "BLOCK construct" by "block", replace "an" by "every", and replace "the construct" by "the block". [128: 6.6.3.2p5] ------------------------------------------------------- Editor: Replace "BLOCK construct" by "block". [129: 6.6.3.2p12] ------------------------------------------------------ Editor: Replace "BLOCK construct" by "block". [148: 7.1.11p1 ] ------------------------------------------------------- Editor: Replace "BLOCK construct" by "block". [148: 7.1.11p2(5-6) ] -------------------------------------------------- Editor: Replace "BLOCK construct" by "block" thrice. [149: 7.1.11p9+ ] ------------------------------------------------------ Editor: Insert a new paragraph after [149:7.1.11p9]: "Specification expressions are evaluated when the procedure defined by the subprogram in which they appear is invoked, or when the block in which they appear is executed. The value of a specification expression, and hence of a bound, cobound or length parameter defined by the value of the expression, is not changed by execution of executable constructs within the subprogram or block." [169: 8.1.1p2 R801] ---------------------------------------------------- Editor: Replace R801: R801 <> [ ] [ ] ... [169:8.1.2.2p1] -------------------------------------------------------- Editor: Replace "with the" by "with elaboration (2.4.5) of the of the block, followed by" [171: 8.1.4p1 C806-C808] ----------------------------------------------- Editor: Throughout C806-C808, replace "R807" by "R801" and replace "BLOCK construct" by "". Then move the constraints to be after the revised R801 at [169: 8.1.1p2]. [172: 8.1.4p2] --------------------------------------------------------- Editor: Replace "BLOCK ... (16.4)" by " declare construct entities, whose scope is the ". Then move the paragraph to follow 8.1.1p2. [172: 8.1.4p3] --------------------------------------------------------- Delete because it is covered by the revised 8.1.2.2. [268-269: 11.2.2p2] ---------------------------------------------------- Editor: Replace "BLOCK construct" by "block" twice. [308: 12.7p2 C1276] ---------------------------------------------------- Editor: Replace "BLOCK construct" by "block". [442: 16.4p1] ---------------------------------------------------------- Editor: Replace "BLOCK construct" by "block". [442: 16.4p3] ---------------------------------------------------------- Editor: Insert "or block" after "scoping unit". [448: 16.5.2.5p1(6)] --------------------------------------------------- Editor: Replace "BLOCK construct" by "block". [448: 16.5.2.5p1(9)] --------------------------------------------------- Editor: Replace "BLOCK construct" by "block" twice. [454: 16.6.5p1(22)] ---------------------------------------------------- Replace "Invocation of a procedure" by "Elaboration (2.5.4) of a specification part". [454: 16.6.5p1(27)] ---------------------------------------------------- Editor: Delete because it is now covered by 16.6.5p1(22).