|
The joy of fixed column coding. ![Big Grin | :-D](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_biggrin.gif)
|
|
|
|
|
Not to forget the now infamous GOTO, which was indeed a saviour in those days.
|
|
|
|
|
Amarnath S wrote: GOTO, which was indeed a saviour in those days Not in 1987! Maybe it was true in 1967, although we had had Algol since 1960 (or 1958 for early blomers).
In 1968, we had the first major revision of Algol. Pascal arrived in 1970, Modula in 1975, C++ in 1985.
Dijkstra's "Go to statement considered harmful" is dated 1968.
If you considered GOTO 'a saviour' in 1987, you were either badly uninformed or extremely slow in adopting modern programming trends.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
You will pry my goto s from my cold dead hands.
finite automata, FTW
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
In 1987, I was in my pre-final year of Mechanical Engineering degree. Computers were new, having been introduced in India in early 80's, and programming was entirely new to me. Getting hands onto a computer was indeed rare, and somehow I got hands on a VAX VMS mainframe system. Compiling, linking, running - were all new. I had just learnt that there's something called as a 'file' - because the only files known were office files. And we were writing 'files' to implement the Newton Raphson method, the Regula Falsi method, etc.
Against this backdrop, GOTO was indeed a saviour, because what it did was indeed magic. And all my files were not more than 70 or 80 lines long, as it was college-level code.
|
|
|
|
|
It rather depends whether you are talking about the 'vanilla' GOTO statement. which exists, in some form, in most languages, and at least arguably has a limited number of valid uses, or Fortran's 'Computed GOTO', which I can only recall using once in my life as a Fortran programmer, and which is probably one of the most bug-prone programming constructs ever devised!
|
|
|
|
|
One of my Computer Science professors back in the late '80s had the memorable quote: "Be wary of anyone who refers to Fortran77 as 'the new Fortran'." ![Cool | :cool:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_cool.gif)
|
|
|
|
|
During my student days, we wrote a spoof Fortran language proposal to add the COMEFROM statement to replace the much derrided GOTO
|
|
|
|
|
According to Wikipedia, the first comefrom dates back to 1973.
My first encounter with comefrom was in the Babbage programming language, from 1981 (Babbage - The language of the future[^]). Babbage has a lot of other nice features, such as the 'conditional threat statement: DO so and so OR ELSE; For function calls, you have not only call by value and call by reference, but also call by long distance. For case switches, it has the BRIEF CASE statement to encourage portable programming.
A few years ago, I needed programmatic access to the backtrace in an exception handler (maybe there were libraries to do it, even at that time, but I found none, and it wasn't that much work doing it myself). 'ComeFrom' was an obvious name for the stack traversal routine, to show where execution came from when walking into the code causing the exception.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
Nothing wrong with that Richard
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
|
Seems you are not quite up to date if you are making such statements.
And thus don't know the difference between FORTRAN and Fortran... ![Poke tongue | ;-P](https://www.codeproject.com/script/Forums/Images/smiley_tongue.gif)
|
|
|
|
|
Old timers Fortran programmers are retiring and need replacements.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Maybe they can become trainers, coaches. Income after retirement.
|
|
|
|
|
The problem with that is, whoever of the old gurus said (in the 1970s): 'I don't know what languages will look like in year 2000, but they will be called Fortran!'
Fortran 2023 has very little to do with the Fortran I learned in my studies in 1978-83. (Fortran was limited to the first two years.) I do not recognize today's Fortran as anything even vaguely resembling what I learned back then. If I were to teach it, I would first have to learn it as a new language.
Is GOTO at all a relevant statement in modern Fortran?
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
Agree.
As I remember, FORTRAN 90, which I came across in the late 90's had the concept of Pointers. Today's FORTRAN may even have the concept of Classes. And the GOTO may be like "Hey GOTO, GO AWAY FOREVER".
|
|
|
|
|
Yes, it's good to know .. and the comment on their page adds some reasonable explanation:
"... Less than half a year ago, the new ISO Fortran 2023 definition was published. ... Fortran appears to be fast, having native mathematical computation support, mature, and free of charge. Silently, slowly but surely, Fortran gains ground. It is surprising but undeniable. ..."
So, it's time to find my Fortran FFT code which I used back then ...
modified yesterday.
|
|
|
|
|
From what I've heard, its the NAG, the UK-based Numerical Algorithms Group, which has mainly been responsible for the continued usage of Fortran.
|
|
|
|
|
I would guess it has to do with supercomputers in large part. Fortran has been used with them for decades and still is. Nvidia has support for CUDA in Fortran and that makes it possible to adapt code to run on GPUs which almost every modern supercomputer has these days.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Quote: I would guess it has to do with supercomputers in large part. That's possible indeed ... Perhaps surprisingly, there is a lot of up-to-date information, for example Fortran - Wikipedia, it makes me also think about possible use in LLM training ...
|
|
|
|
|
'mother tongue' for me as well.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
When I learned C I forgot Fortran, and was happy!
|
|
|
|
|
I had a class in C and FORTRAN in 87/88. I already knew FORTRAN, and I took it mostly for the C.
The teacher tortured us by assigning programs to be solved in the language least suited to solve the problem.
Write some numerical algorithm in C( not FORTRAN ).
Write some parsing and word counting code in FORTRAN(not C)
Kind of proved the point that you can solve any problem with any language.
|
|
|
|
|
Can we compare this with filling a round hole with a square peg? Only that the hole and peg are made of somewhat flexible rubbery material.
|
|
|
|
|
1971 1st year university Computer Science - FORTRAN IV on an IBM 360 with the WATFOR compiler which later became WATFIV. Punched cards and IBM golfball terminals.
Then onto IBM 370 then onto CDC 7000 series all with FORTRAN IV. All this mixed with COBOL, PL/1 and assembler.
Currently working with C# and thinking about learning Angular
|
|
|
|