[TUHS] origin of string.h and ctype.h
Johnny Billquist
bqt at update.uu.se
Mon Aug 14 07:55:40 AEST 2017
On 2017-08-13 19:24, Dave Horsfall <dave at horsfall.org> wrote:
> On Sat, 12 Aug 2017, Steve Johnson wrote:
>> A little Googling shows that the IF I mentioned was called the
>> "arithmetic IF".
> Ah yes. It was in FORTRAN II, as I recall.
Still there in FORTRAN 77.
>> There was also a Computed GOTO that branched to one of N labels
>> depending on the value of the expression.
> I think that was still in FORTRAN IV?
Still there in FORTRAN 77.
>> And an Assigned GOTO whose main use, as I remember, was to allow for
>> error recovery when a subroutine failed...
> A real ugly statement; you assigned a statement number to a variable, then
> 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.
But of course, bad programmers can mess things up beyond belief in any
language.
(And I never went beyond FORTRAN 77, so I don't know how current
versions look like. I stayed with PDP-11s (well, still do), and nothing
newer than FORTRAN 77 exists there. :-) )
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the TUHS
mailing list