3 ms·
I had to look up ‘Ratfor’ because I’d never heard of it — apparently it’s a FORTRAN preprocessor that added control structures.
by qubex 7y ago
I had to look up ‘Ratfor’ because I’d never heard of it — apparently it’s a FORTRAN preprocessor that added control structures.
- msla 7y agohttps://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
- davidwihl 7y agoOne of the books that most influenced my coding was Software Tools by Brian W. Kernighan, P.J. Plauger [0]. Even though I never used Ratfor, the clear descriptions were immensely useful. [0] https://www.goodreads.com/book/show/515603.Software_Tools https://www.goodreads.com/book/show/515603.Software_Tools
- qubex 7y agoI have that book. I have read snippets of it. Evidently I should read all the way through it.