- Ratfor
Ratfor (short for RATional FORtran) is a
programming language implemented as apreprocessor forFortran 66. It provided modern control structures, unavailable in Fortran 66, to replaceGOTO s and statement numbers.Ratfor was designed and implemented by
Brian Kernighan at
Bell Telephone Laboratories in 1974, and described in Software-Practice & Experience in 1975. It was used in the book "Software Tools" (Kernighan and Plauger, 1976).Ratfor provides the following kinds of flow-control statements, described by Kernighan and Plauger as "shamelessly stolen from the language C, developed for the UNIX operating system by D.M. Ritchie" ("Software Tools", p. 318):
* statement grouping with braces
* if-else, while, for, do, repeat-until, break, next
* "free-form" statements, i.e., not constrained by Fortran format rules
* <, >, >=, ... in place of .LT., .GT., .GE., ...
* include
* # commentsThe version of Ratfor in Software Tools is itself written in Ratfor, as are the sample programs, and inasmuch as its own translation to Fortran is available, it can be ported to any Fortran system, and surely has been. Ratfor source code files end in .r or .rat.
External links
* [http://sepwww.stanford.edu/software/ratfor.html Ratfor]
* [http://hopl.murdoch.edu.au/showlanguage.prx?exp=692&language=RATFOR History of Programming Languages: Ratfor]ee also
*
Ratfiv
Wikimedia Foundation. 2010.