Ratfor
Ratfor (short for Rational Fortran) is a programming language implemented as a preprocessor for Fortran 66. It provides modern control structures, unavailable in Fortran 66, to replace GOTOs and statement numbers.
Ratfor (short for Rational Fortran) is a programming language implemented as a preprocessor for Fortran 66. It provides modern control structures, unavailable in Fortran 66, to replace GOTOs and statement numbers. , >=, ... in place of .LT., .GT., .GE., ... include # comments For example, the following code if (a > b) { max = a } else { max = b } might be translated as IF(.NOT.(A.GT.B))GOTO 1 MAX = A GOTO 2 1 CONTINUE MAX = B 2 CONTINUE The version of Ratfor in Software Tools is 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. Ratfor source code file names end in .r or .rat. With the availability of Fortran 77, a successor named Ratfiv (Ratfor=rat4 => rat5=Ratfiv) could, with an option /f77, output a more readable Fortran 77 code: IF (A .GT. B) THEN MAX = A ELSE MAX = B ENDIF Initial Ratfor source code was ported to C in 1985 and improved to produce Fortran 77 code too. A git tree has been set in 2010 in order to revive ratfor . Although the GNU C compiler had the ability to directly compile a Ratfor file (.r) without keeping a useless intermediate Fortran code (.f) ( gcc foo.r ), this functionality was lost in version 4 during the move in 2005 from f77 to GNU Fortran. The original source was available in .deb and .rpm forms at its original site, mirror.corbina.net/mandriva/, and its archive, www.dgate.org/ratfor/ are gone as of April, 2024. Source tarballs are still available at the Internet Archive. Ratfor Ratfor90 History of Programming Languages: Ratfor Purdue summary Ratfor90
References
No reference rows published for this article.
Cite this article
MLA
"Ratfor." encyclopegia.org, 2025, https://encyclopegia.org/wiki/ratfor. Accessed 25 November 2026.
Chicago
"Ratfor." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/ratfor.
APA
encyclopegia.org. (2025). Ratfor. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/ratfor
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON