Ratfiv
|
Ratfiv is an enhanced version of the Ratfor programming language, a preprocessor for Fortran designed to give it C-like capabilities. Fortran was widely used for scientific programming but had very basic control-flow primitives ("do" and "goto") and no "macro" facility which limited its expressiveness.
The name of the language is a pun (Ratfor (RATional FORtran) -> "Rat Four" -> "Rat Five" -> RatFiv), in the best of hacker's traditions.
Ratfiv was developed by Bill Wood at the Institute for Cancer Research, Philadelphia, PA in the early 80's and released on several DECUS (Digital Equipment Users Group) SIG (Special Interest Group) tapes. It is based on the original Ratfor by B. Kernighan and P. J. Plauger, with rewrites and enhancements by David Hanson and friends (U. of Arizona), Joe Sventek and Debbie Scherrer (Lawrence Berkely Laboratory).
Ratfiv V2.1 was distributed on the DECUS RSX82a SIG tape and is archived here (http://www.ibiblio.org/pub/academic/computer-science/history/pdp-11/rsx/decus/rsx82a/330015/). In the "Readme.1st" file, Ratfiv is described:
Ratfiv is a structured Fortran preprocessor providing SWITCH, IF - ELSE, WHILE, FOR, DO, REPEAT - UNTIL, STRING, and BREAK and NEXT constructs. Also supported are INCLUDE files, DEFINE for symbolic constants and macros with arguments, conditional compilation, formats in read, write, encode, and decode statements, use of >, <, etc. instead of .GT., .LT., etc, and the RETURN VALUE construct in functions. Ratfiv was developed from the Ratfor compiler distributed by Lawrence Berkley Labs; versions are available for VAX VMS and RSX/IAS systems. The major enhancements in Ratfiv are: 1. Ability to specify a format statement inside READ, WRITE, ENCODE, and DECODE statements; 2. Consistent line continuation using the underline character; 3. Production of properly indented upper case Fortran code with comments passed through; 4. Optional output of Fortran 77 code with the /F77 switch (however this switch produces valid code for VAX Fortran 77 only); 5. Addition of a /SYMBOLS switch to the command line to optionally read the SYMBOLS file; 6. Output of quoted strings or optionally hollerith strings (quoted string output allows Ratfiv to be used with DEC Fortran OPEN statements, the Fortran 77 CHARACTER data type, etc.); 7. Evaluated and unevaluated arguments in macros; 8. Correct line number reporting; 9. Exit with error status if an error occurs during compilation; 10. Use of character constants in case labels; 11. Numerous bug fixes; 12. Comprehensive documentation; 13. Ratfiv keywords need not appear at the beginning of a source line in order to be recognized.