Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ogicse!milton!whit From: whit@milton.u.washington.edu (John Whitmore) Newsgroups: comp.lang.fortran Subject: Re: Is the INCLUDE statement standard? Summary: Since it's not standard, there's a LOT of differences in usages. Message-ID: <7043@milton.u.washington.edu> Date: 4 Sep 90 20:29:16 GMT References: <1990Aug29.160951.19827@athena.mit.edu> <90241.151245BOYDJ@QUCDN.BITNET> Organization: University of Washington, Seattle Lines: 37 In article <90241.151245BOYDJ@QUCDN.BITNET> BOYDJ@QUCDN.QueensU.CA (Jeff Boyd) writes: > >I'd use INCLUDE whether it's standard or not (I don't think it is). >If you send a package of mainprogs plus include files to another >site where the compiler won't INCLUDE, the recipient need only use >an editor to insert the include files back into the mainprogs. I used to think this way, too, until I found a set of programs in a text library (VAX/VMS). One can generate a long text file from the library (trivially). This text file can be ported to another machine. An attempt to compile runs into the following problem: there are INCLUDE statements that reference modules in the original library. The references are by module name (now lost...). The original FORTRAN compiler invocation had a switch that could be set so that any particular text library (or set thereof) could be searched to fulfill the 'INCLUDE' directives. The result was that the proposed scheme for porting the source code ran into a problem that could ONLY have been predicted by someone who knew in advance the INCLUDE usage (i.e. had read and understood almost all of the source code). Compiling any given program from the library required the programmer to explicitly require that the text library be searched, for any unresolved 'INCLUDEs. This was accomplished by an entry in a 'group logical name table' which few of the current group members remembered even existed. The upshot is that a LOT of research was required before anyone outside the group could handle the programs. Program maintenance requires INCLUDE capability, as well as some sort of version control (MAKE is a pretty well thought out tool), but for portability, one should make standalone long source files. There's no particular benefit to INCLUDE if the programmer has to remember (by wetware) which modules need the recompile before the next link. For me, INCLUDE solves too few problems. I avoid it. John Whitmore