J3/04-108 Date: 08 Dec. 2003 To: J3 From: Dan Nagle Subject: Name of Block Should Have Scope of Block The name of a block should have the scope of the block. Number: Title: Name of Block Has Scope of Block Submitted By: J3 Status: For Consideration References: Basic Functionality: Give the name of a block the scope of the block, rather than the local scoping unit scope it now has. This will allow, for example, blocks to be labeled 'read_error:' etc. without error (which is consistent with copy-and-paste editing). Rationale: Block names are not referenced outside the block, so there is no reason to give then local scope. Inventing a block scope allows block names to be repeated within a local scope, so names like 'open_error:' or 'planes_loop:' may be re-used. Estimated Impact: Low, no use of block names is made outside the block. Other proposals have been mentioned for block level variables scope, so this feature may 'piggy-back' along with that one. EXIT and CYCLE are unaffected, as they operate from within the block. Detailed Specification: A new scope, that of a block (if, do, etc.) will be invented and names of blocks given this scope. Example: ! open first input file open( ... , iostat= istatvar, ...) open_error: if( istatvar > 0 )then ! do something endif open_error ! open second input file open( ... , iostat= istatvar, ...) open_error: if( istatvar > 0 )then ! do something endif open_error History: