08-295 To: J3 From: Malcolm Cohen Subject: External procedures and binding labels Date: 2008 November 16 References: Interp F03/0076, 08-007r2, 08-187, 08-196. 1. Introduction Interp F03/0076 concluded that an external procedure having a given binding label has to have the same procedure name in every scope. It was suggested that this ought to be changed in F2008, as part of the process of interp reconsideration and integration. Edits were suggested in 08-187 that would result in the names of external procedures that have binding labels being local identifiers. As a general principle, global entities that have a binding label have that binding label as their global identifier; the name of such an entity should not be a global identifier. Thus this should be straightened for common blocks as well as external procedures. Section 3 contains the additional edits that are required for this. 2. Edit for procedures [439:16.2p1 2nd sentence] After "external procedure" insert "with no binding label", delete "and shall not ... in the same program" (i.e. everything after the first "global identifier"). In the third sentence (beginning "The submodule") delete "and shall ... other submodule" (i.e. stop after "global identifier".) In the fourth sentence (beginning "A binding label") delete "and shall ... in case". {Shorten paragraph by just defining global entities and global identifiers.} [439:16.2p1+] Insert new paragraph "The global identifier of an entity shall not be the same as the global identifier of any other entity. Furthermore, a binding label shall not be the same as the global identifier of any other global entity, ignoring differences in case." {New paragraph giving the restrictions on global identifiers.} [439:16.2 Note 16.1] Replace note with "An intrinsic module is not a program unit, so a global identifier can be the same as the name of an intrinsic module." {Make sure it is clear that this is allowed, with reasoning. The previous note is now a trivial consequence of the preceding paragraphs, so we don't need to spell it out.} [440:16.3.1p1] Change "intrinsic procedure" to "intrinsic procedures", After "intrinsic procedures," insert "external procedures that have binding labels, intrinsic modules,", [440:16.3.1p2] Join this paragraph to p1, i.e. we should not have a sentence that extends over two paragraphs! [441:16.3.2p1] Change "COMMON or SAVE" to "BIND, COMMON, or SAVE" {Fix bug in F2003 C interop.} 3. Edits for common blocks [439:16.2p1 2nd sentence] After "common block" insert "with no binding label". {A common block name should not be global if it has a binding label.} [440:16.3.1p1] In item (2), delete final "and", Append to item (3) ", and" Append to list new item "(4) common blocks that have binding labels" {Local identifiers of common blocks, these should not be class 1.} [440:16.3.1p3] After "class (1)" insert "or class (4)". [441:16.3.2p1] After "If a local identifier" insert "of class (1)". {Don't get confused when the local identifier *is* a common block.} ===END===