Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!msuinfo!news From: fox@DASHER.NSCL.MSU.EDU Newsgroups: comp.lang.fortran Subject: Re: global data Message-ID: <1991Jan8.130651.20104@msuinfo.cl.msu.edu> Date: 8 Jan 91 13:04:41 GMT Sender: news@msuinfo.cl.msu.edu Distribution: usa Organization: National Superconducting Cyclotron Lab Lines: 32 In article <16609@cs.utexas.edu>, ubiquity@cs.utexas.edu (Richard Hoffman) writes... >In article <1991Jan7.131620.27789@msuinfo.cl.msu.edu> fox@DASHER.NSCL.MSU.EDU >writes: >>.. and since INCLUDE is not part of the FORTRAN-77 standard, there's no >>portable way to get the effect of a global parameter statement. > >One way to get a semi-portable INCLUDE *anywhere* is to use the C >preprocessor. You don't have to know anything about C, except >for the rules of #include itself. C is widely available, so most >installations will have it. I have frequently used it with FORTRAN, >and also the C #define statements, which I find much more convenient >than PARAMETER statements. > >It does add an extra step to program preparation, though. Not all C compilers decouple the preprocessor from the compiler. This implies that it's not always possible to get C preprocessor output. So this isn't so portable after all. This statement covers a few DOS compilers, and the VMS C compiler as well. Of course writing a pre-processor which understands the #include directive is not so hard, and that's probably the only *truly* portable way to do it until FORTRAN-9x compilers begin to appear. Ron Ron Fox | FOX@MSUNSCL.BITNET | Where the name NSCL | FOX@CYCVAX.NSCL.MSU.EDU | goes on before Michigan State University | MSUHEP::CYCVAX::FOX | the quality East Lansing, MI 48824-1321 | | goes in. USA