cdsf@cal-unix (10/23/85)
Newsgroups: unix-wizards Subject: converting fortran-4 to fortran-77 Expires: References: Sender: Reply-To: cdsf@cal-uni.UUCP (Jack Kitchens) Followup-To: Distribution: Organization: Calculon Corp. Rockville, MD (301) 258-5300 Keywords: We have some fortran-4 source, currently on a PCompatible, that needs to be converted to fortran-77 so we can compile it with the microsoft fortran compiler. The big difference between the two seems to be the format of the DATA and format statements. Does anyone have any suggestions or programs to convert from 4 to 77? We can easily get the source from the PC to our VAX, which is running Berk 4.1. Thanks. Peter Thaggard, non-fortran hacker.
ken@rochester.UUCP (and Vicki Herrieschopper) (10/27/85)
In article <672@cal-unix> cdsf@cal-uni.UUCP (Jack Kitchens) writes: >We have some fortran-4 source, currently on a PCompatible, that needs to >be converted to fortran-77 so we can compile it with the microsoft fortran >compiler. The big difference between the two seems to be the format of the >DATA and format statements. F77 is a superset of F4 with the exception of: 1. Hollerith data, which is sometimes supported for compatibility but discouraged. 2. Extended do loops (you don't to know about this). 3. Semantics of the do loop (now it may be executed zero times, whereas in F4 it executed at least once). Since you say the difference is in the DATA and format statements (I assume you tried compiling, but you didn't say what the F77 compiler objected to), I would first change the Hollerith data to quoted strings. If the compiler won't let you initialize non-character variables with string data, then you have to convert such constructs to use the character data type of F77, which is another story. Ken -- UUCP: ..!{allegra,decvax,seismo}!rochester!ken ARPA: ken@rochester.arpa USnail: Dept. of Comp. Sci., U. of Rochester, NY 14627. Voice: Ken!