4 ms·
Fortran ignoramus here... is this true?: "...Fortran doesn't have a structured IF, REPEAT ... UNTIL, or CASE statement..." How the heck did anyone loop until a
by jheimark 15y ago
Fortran ignoramus here... is this true?: "...Fortran doesn't have a structured IF, REPEAT ... UNTIL, or CASE statement..." How the heck did anyone loop until a condition was met?
- barrkel 15y agoStructured if implies block structure; Fortran had a single-statement if (with ambiguous lexing to boot). That single statement could be a goto.
- jheimark 15y agoso... you'd have to write a series of ifs and single-statement gotos every time?
- Roboprog 15y agoYep. I ran into Fortrash IV in college after doing '77 earlier. No "else" statement in IV. IF NOT <<condition>> GOTO <<start of else>> <<do iffy stuff>> GOTO <<end-if>> <<label for else>> <<do elsey stuff>> <<label for end-if>> Barbarism at its finest :-)
- mhd 15y agoWhich is the main reason why Kernighan created Ratfor... (http://en.wikipedia.org/wiki/Ratfor http://en.wikipedia.org/wiki/Ratfor)
- groby_b 15y agoYes. Welcome to the "good old days" of programming :)
- Natsu 15y agoMy programmable calculator worked just like that, where the only flow control was in the form of goto. Seeing C for the first time was such a revelation. I remember being so excited to see all these things like for, while, etc. and it was immediately obvious just how much better they were.