On 2017-08-13 19:24, Dave Horsfall <dave@horsfall.org> wrote:
On Sat, 12 Aug 2017, Steve Johnson wrote:
A little Googling shows that the IF I mentioned was called theAh yes. It was in FORTRAN II, as I recall.
"arithmetic IF".
Still there in FORTRAN 77.
There was also a Computed GOTO that branched to one of N labelsI think that was still in FORTRAN IV?
depending on the value of the expression.
Still there in FORTRAN 77.
And an Assigned GOTO whose main use, as I remember, was to allow forA real ugly statement; you assigned a statement number to a variable, then
error recovery when a subroutine failed...
did a sort of indirect GOTO (or did the compiler recognise "GOTO I")?
The compiler recognize "GOTO I". And I have to be assigned to a statement number (label). It has to be an integer variable, and when you assign it to a label, you cannot do any arithmetic with it anymore. And you assign it with a special statement. Thus, it can be used to store what label to jump to, but you cannot use arithmetic to set what it should jump to.
How those poor devils ever debugged their code with such monstrous
constructions I'll never know.
It's actually not that hard. All this stuff is fairly simple to deal with. The real horror in FORTRAN is EQUIVALENCE, which can give C a fair fight for real horror stories.