Fortran
-
Not to forget the now infamous GOTO, which was indeed a saviour in those days.
During my student days, we wrote a spoof Fortran language proposal to add the COMEFROM statement to replace the much derrided GOTO
-
I have been writing Fortran since 1989 and have never used a punched card (or tape)
IBM 026 card punch machines and Olivetti teletypes producing blue paper tape where my starting point. Still have some original, unpunched, Fortran Statement cards kept as a souvenir.
-
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... ;P
-
I remember having to modify someone's C who wrote mainly in Fortran. It was basically Fortran with C syntax. You can write Fortran in any language.
-
Perhaps, for the first time in this millennium, FORTRAN comes in the Top 10 [TIOBE Index - TIOBE](https://www.tiobe.com/tiobe-index/) [^] As a side note, my 'mother-tongue' is FORTRAN, being the first computer language i learnt in 1987. Hope this news isn't a repeat.
"millennium" A little bold there :). But anyway, I've always been astonished at the amount of code that is our there written in "legacy" languages that run the world. Cobol, FORTRAN, PL1, God forbid Pascal. I'm in the process this year of proposing a system re-write of a FORTAN manufacturing system before everybody that knows about it is dead, including myself. I dug into this 10 years back or so, and I realized that 40% of the code is user input, 20% is actually processing data, and the last 40% is report generation. Moving this to a modern architecture will likely reduce the code base by 75%. Meanwhile this company has spent millions trying to create an equivalent system. I'm shooting for retirement income :)
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
-
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.
-
I'm not aware of an arithmetic IF in C :)
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
It is written in longhand C as
if (expr < 0) goto lab1;
else if (expr == 0) goto lab2;
else goto lab3;If you accept use of jump labels at all, that is. The C version is not as compact as Fortran, but you could easily make a #define for putting it on a single line.
Religious freedom is the freedom to say that two plus two make five.
-
It is written in longhand C as
if (expr < 0) goto lab1;
else if (expr == 0) goto lab2;
else goto lab3;If you accept use of jump labels at all, that is. The C version is not as compact as Fortran, but you could easily make a #define for putting it on a single line.
Religious freedom is the freedom to say that two plus two make five.
well for sure. and for the record I despise #define/macros unless they are very very simple. I've seen some developers put darn near full functions in them. I never understood why you would do that, but whatever.
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
-
Perhaps, for the first time in this millennium, FORTRAN comes in the Top 10 [TIOBE Index - TIOBE](https://www.tiobe.com/tiobe-index/) [^] As a side note, my 'mother-tongue' is FORTRAN, being the first computer language i learnt in 1987. Hope this news isn't a repeat.
My First computer language was also FORTRAN, though a bit earlier in 1965. The first run of my first program caused a core dump because I left out a minus sign. I had no idea what that was at that time, but it seemed to excite the people assisting us in the lab. The corrected program got the results I wanted. Haven't used it since my student days though.
-
Perhaps, for the first time in this millennium, FORTRAN comes in the Top 10 [TIOBE Index - TIOBE](https://www.tiobe.com/tiobe-index/) [^] As a side note, my 'mother-tongue' is FORTRAN, being the first computer language i learnt in 1987. Hope this news isn't a repeat.
Amarnath S wrote:
FORTRAN comes in the Top 10
I wouldn't get too excited. If you look at the chart Fortran has been bubbling along at about the same rate for decades. The rate of change around level 10 is at tenths of a percent. Visual Basic is almost twice as high and COBOL is only 0.6% lower. Matter of fact Visual Basic percentage change went down in the in the last month than the entire value for Fortran. If you want to get excited then C, C++, Java and C# together dropped an amazing 10%.