Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!well!rchrd From: rchrd@well.sf.ca.us (Richard Friedman) Newsgroups: comp.lang.fortran Subject: Re: Tools for porting fortran? Message-ID: <23175@well.sf.ca.us> Date: 15 Feb 91 17:49:44 GMT References: <91044.104254AMB@SLACVM.SLAC.STANFORD.EDU> Organization: Pacific-Sierra Research Lines: 26 AMB@SLACVM.SLAC.STANFORD.EDU writes: >In C, there are compiler directives (#if, #else, etc) for this. >Anyone have a method, or commercial product, for doing this to fortran? On most systems the C preprocessor can be called directly (cpp ...), to give the same functionality for fortran. For example, on Cray UNICOS: cpp -P small_mdl.fig source.f > source.x.f cf77 -o myprog source.x.f Unfortunatly on UNICOS cf77 wont accept a pipe so you have to create an intermediate file from the output of cpp. Note the usage here, allowing the user to create "configuration files" (xyz.fig, say) which contain a set of definitions (in the example, perhaps small_mdl.fig is the set of defines to specify compilation of a small size model for source.f.. say). We are currently implementing this sort of "configuration control" scheme in our FORGE/MIMDizer product, thus allowing the user to maintain a variety of "flavors" of a source code within a single file. -- /\=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=/\ \/Richard Friedman (415)540-5216 | rchrd@well.sf.ca.us \/ /\Pacific-Sierra Rsrch (Berkeley) | or well!rchrd@apple.com /\ \/=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\/