ISO/IEC JTC1/SC22/WG5 N1577 25 September 2003 To: WG5 From: Van Snyder, Malcolm Cohen Subject: Change proposed to TR 19767 The purpose of technical report 19767 is to address the deficiencies of Fortran to support large programming projects. In a large project it is likely that the names of global entities will conflict. If submodule names are global identifiers, they will contribute to these conflicts. There is, however, very little reason for the name of a submodule to be a global identifier. The submodule cannot be used by the programmer in any way outside of the "submodule tree" headed by its ancestor module, and even there it can only be used in a SUBMODULE statement. Therefore, in order to remove any unnecessary conflicts that would be caused by the name of the submodule being global, it is proposed that it should be local to its ancestor module. The only change this introduces is that for a submodule of a submodule, the programmer must specify the ancestor module name as well as the parent submodule name. There is no change for submodules of modules. To accomodate this, the following modification of the SUBMODULE statement is proposed: SUBMODULE ( [ : ] ) Beyond this syntax change, which affects [7:21] in J3 paper 03-199r1, edits (with respect to 03-007r1) to implement this change are not extensive: [405:19,22] Insert "non-submodule" before "program unit", twice. {Submodule names are not global identifiers.} [406:9] Delete "and". [406:10] Append ", and". [406:10+] insert "(4) If the scoping unit is that of a module, its submodules". This puts submodule names into a local class of their own, so that they do not clash with any other kinds of names, either local or global. (Submodule names only ever appear on a SUBMODULE statement so there is no chance for confusion.) Submodule names are already not accessible via USE or host association, so there is no additional text needed elsewhere. (The descriptions of use and host association list the things that they give access to, and submodules do not appear in these lists).