Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pacbell!att-ih!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!hirchert From: hirchert@uxe.cso.uiuc.edu Newsgroups: comp.lang.fortran Subject: Re: F8X response, MODULE vs. INCLUD Message-ID: <50500035@uxe.cso.uiuc.edu> Date: 10 Mar 88 18:59:00 GMT References: <5714@ames.arpa> Lines: 30 Nf-ID: #R:ames.arpa:5714:uxe.cso.uiuc.edu:50500035:000:1820 Nf-From: uxe.cso.uiuc.edu!hirchert Mar 10 12:59:00 1988 Professor McDonald writes >>I do not consider INCLUDE an adequate replacement for MODULE/USE. I would not >>object to having INCLUDE in addition to MODULE/USE, but most people seem to >>object to the redundancy inherent in that kind of combination. > >>Kurt W. Hirchert National Center for Supercomputing Applications > >There is still a positive need for INCLUDE that is not met by MODULE/USE. >That is inclusion of such things as code fragments and other things which >don't fit the allowed syntax of a module. It is not redundant. INCLUDE >allows ANYTHING in it, even just part of a statement. This is very important >since F8x does not have macros or defines. 1. The MIL-STD-1753 INCLUDE statement (which is what many vendors have chosen to implement) does NOT allow the inclusion of partial statements. 2. In many (but not all) cases, included code fragments can be replaced by references to internal or module procedures. If the compiler supports in-line expansion of such procedures (as most compilers do for statement functions), efficiency need not be lost. (However, it would probably be inefficient to expand all internal procedures in-line, and Fortran 8x provides no standard way to indicate which should and which shouldn't. I never claimed that Fortran 8x was perfect.) 3. I did not mean to give the impression that I thought INCLUDE was 100% redundant with respect to MODULE/USE. I would suggest that, in practice, it is something like 99% redundant. (In other words, most uses of INCLUDE are not for the purposes Professor McDonald is concerned about.) The issue is whether the 99% redundancy is justified by the 1% of nonredundancy (or by the need to "standardize existing practive"). Kurt W. Hirchert National Center for Supercomputing Applications