3 ms·
https://en.wikipedia.org/wiki/Ratfor https://en.wikipedia.org/wiki/Ratfor The original Ratfor brings FORTRAN 66 nearly up to the level of a respectable program
by msla 7y ago
https://en.wikipedia.org/wiki/Ratfor https://en.wikipedia.org/wiki/Ratfor
The original Ratfor brings FORTRAN 66 nearly up to the level of a respectable programming language.
It turns this:
if (a > b) {
max = a
} else {
max = b
}
Into this:
IF(.NOT.(A.GT.B))GOTO 1
MAX = A
GOTO 2
1 CONTINUE
MAX = B
2 CONTINUE
... with proper columnization, of course.
Going the opposite direction is pretty miraculous to me.
Ratfiv is the follow-on, which did the same to FORTRAN 77. However, FORTRAN 77 had control structures beyond the conditional GOTO, so Ratfiv was somewhat less necessary.
FORTRAN 77 would look like this:
IF (A .GT. B) THEN
MAX = A
ELSE
MAX = B
ENDIF
https://en.wikipedia.org/wiki/Ratfiv https://en.wikipedia.org/wiki/Ratfiv