Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!yale!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: global data Message-ID: <10553@lanl.gov> Date: 7 Jan 91 19:40:28 GMT References: <1991Jan7.131620.27789@msuinfo.cl.msu.edu> Distribution: usa Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 23 From article <1991Jan7.131620.27789@msuinfo.cl.msu.edu>, by fox@DASHER.NSCL.MSU.EDU: > [...] > .. 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. [...] Well, write your INCLUDE preprocessor in Fortran 77 (a simple task) and the capability will be present on every machine that Fortran 77 runs on. There are 'off the shelf' preprocessors written in Fortran 77 listed in many books. > [...] A question > to those following FORTRAN-9x.. how is this problem dealt with (if at all) > in that language? Fortran Extended (the most recent, and let's hope final name) has both INCLUDE and MODULE in it. Either one will support global named constants (parameters). MODULES also support private constants, variables, and procedures (so a library can have internal structure that cannot be interfered with from outside). MODULEs are among the few things that the new standard does well. INCLUDE is basically redundant when MODULEs are available. J. Giles