Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!talcott!panda!grkermi!genrad!decvax!decwrl!sun!guy From: guy@sun.uucp Newsgroups: net.lang.f77 Subject: Re: Translator from Rat4 to F77? Message-ID: <2290@sun.uucp> Date: Tue, 11-Jun-85 02:03:59 EDT Article-I.D.: sun.2290 Posted: Tue Jun 11 02:03:59 1985 Date-Received: Thu, 13-Jun-85 00:39:44 EDT References: <2281@sun.uucp> <453@ho95b.UUCP> <26610@lanl.ARPA> <2850003@acf4.UUCP> <875@sdcsla.UUCP> <361@moncol.UUCP> <373@moncol.UUCP> Organization: Sun Microsystems, Inc. Lines: 30 > >> Hmmm... Has Ratfor been improved in the last few years? The Ratfor which > >> came with our v7 system produces FORTRAN 66 as its output, not f77. > >> > >> This means that the resulting program is often a maze of GOTO's. > > > >F66 is pretty much a proper subset of F77; that's the sense in which Rat4 > >produces F77. It produces code that should be compilable under either > >compiler, assuming that the "plain FORTRAN" part of the code is compilable > >under either compiler. > > I still maintain, however, that the output is really FORTRAN 66 in that it > takes advantage of none of the features added in f77, such as the > IF-THEN-ELSE construct. > (Discussion of using "struct" followed by "ratfor" as a technique for > turning extremely old unstructured FORTRAN into structured F77) A tool to do the aforementioned transformation might be nice, but it's not what RATFOR was intended as. RATFOR was intended as a way to write structured FORTRAN even if you had an F66 compiler; in fact, I believe the Software Tools book gives an address to send away to to get a RATFOR preprocessor written in F66. As such, there wasn't much motivation to make a RATFOR preprocessor that uses block IF. (Besides, nobody's done much with the UNIX RATFOR preprocessor in a while; the only difference between the 4.2BSD "ratfor" and the S5R2 "ratfor", other than the shape of SCCS IDs and other minor cosmetic changes, is a small tweak to avoid generating redundant "goto"s.) It was never intended to be used as part of a structuring tool to take old FORTRAN and turn it into F77. If you want such a tool, why not dive into "struct" and make a version that generates F77 instead of RATFOR? Guy Harris