mccalpin@masig3.ocean.fsu.edu (John D. McCalpin) (09/21/89)
I make extensive use of a preprocessor that converts a Fortran-like language into FORTRAN-77. The preprocessor is called 'prep' and was written by Roger Ove at U. Illinois (now at NCSA?). Prep has four sets of features: (1) file inclusion and conditional compilation - the syntax and functionality is very similar to 'cpp' (2) macro processing - allows simple text replacement and macros with arguments (3) flow control extensions - do/enddo, begin/again, begin/while/again, begin/until, leave (Fortran-8X `exit'), continue (Fortran-8X `cycle'), case (4) vector syntax - controlled by `do_limits' statement (Fortran-8X `set range') - syntax is like: a(#,#,#) = b(#+1,#,#)-b(#-1,#,#) - automatic loop unrolling is optional I have found prep to be an extremely useful preprocessor, and have used it very effectively in the development of a 3-D ocean model. This model contains about 4000 lines of prep and expands into 8000 lines of Fortran-77. The output vectorizes very nicely. `prep' is written in C and is quite portable. It was posted to the USENET comp.sources.unix (volume 8) a while ago. I don't know if that is the most current version. It isn't RATFOR, but I like it much better.... -- John D. McCalpin - mccalpin@masig1.ocean.fsu.edu mccalpin@scri1.scri.fsu.edu mccalpin@delocn.udel.edu