https://github.com/DigitalMars/Empire-for-PDP-10
Fortran-77 is for young whippersnappers.
Eventually we figured out that the lines that weren't working were just over 80 characters long and the ones that were working were under 80 characters long. The compiler we were using was adhering to the Fortran-77 spec of a maximum of 80 characters per line (because that's what would fit on a punch-card), but it was just ripping those lines out and ignoring them without raising any kind of warning. If a line of code was over 80 characters long, it was just silently ignored. All we had to do was split the lines over 80 characters up and that particular bug was squished.
In my humble opinion, if a language can trip you up because of how many characters fit on a punch-card, it qualifies as "old school".
EDIT- Terrifying:
251 GOTO (21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37) I-20
switch (I-20) {
case 21:
case 22:
...
}
but you have to imagine "21" as the string identifier, not the integer value. `I-20` is indexing the list of labels in the GOTO statement.The earlier column beginning with
GOTO (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) I
is easier to read switch (I) {
case 1:
...
case 2:
...
}
because the integer value of I, the string labels, and their index in the list are all the same.I've never written Fortran. I did learn to program using TI-85 BASIC, though, and am well versed in C. The GOTO in the Fortran code is possibly the easiest part for me to understand.
the convention I used was taught was always 4 digits always increasing going down the pages.
7000 and 8000 range where for input and output FORMAT statements, 6000 was used to label code 6999 was always the exit
<hangs head in shame>
I worked as lead on IBM’s ASTI component (part of xlf) 10 years ago, and kind of miss it sometimes.
New standards mark obsolescent or deprecate a few ancient features as they come out, however compilers maintain the support for these features. I'd say that the modern Fortran is almost completely backwards compatible with legacy FORTRAN, as far back as FORTRAN IV (predecessor to FORTRAN 77).
That's very impressive! I assumed the compatibility difference was akin to what Perl 6 is to Perl 5- -- that is, not compatible at all.
If useful if your coworkers are stuck to a old semi unknown machine and want to mix the new code with the old code and run it there too.
(1) Compatibility with legacy FORTRAN. Although it's not difficult to work with legacy FORTRAN via C, it's seamless to pass data around between legacy FORTRAN and Modern Fortran.
(2) The mathematical and array syntax. It's tough to beat Fortran's mathematical notation and easy use of multidimensional arrays.
It seems every language keeps the same name as it evolves, except Algol/C/C#/Java.
Curiously, it often does so in context of Python. One specific example I can remember was a library written in Fortran, with unit tests written in Python.
Time to dust off the Fortran!
After writing code in fortran and running on a shared cluster with a buttload of CPU and RAM, working in a software shop doing python science stuff on a mac makes me miss the speed. I didnt give a about how big my source data was , but now with python, occasionally i miss the ol static typed compiled days. I am giddy when i get to do some numpy matrix array type stuff instead of just glueing things together with python magic!
> completely different
Sound like a contradiction to me...
A language can still be a thing after decades while looking very different.
Ever heard of the Ship of Theseus?
A modern C program doesn't compile in old C compilers. That doesn't mean it's not C. You can change tons of ergonomics and keep the language the same. Or you can keep the spirit the same (which in a language are its core semantics and concepts).
>I believe GP simply didn’t develop their argument effectively.
GP just casually said it's a whole new language in the casual, everyday sense, that a e.g. you can say "it's a brand new car now" after you redid the interior and did some repairs on your 10-year old car.
(And I got in with the Ship of Theseus thing to humor the objection -- not that I really consider the GP statement to have to be taken at face value).
Same language doesn't mean you can necessarily speak it without learning the new words, forgetting some stuff that went deprecated, learning some syntactic sugar and new features. If you were born in 1400 and lived to today, you'd be going from speaking from Medieval French to modern French with hardly noticing the difference...
So? C# 1.0 didn't support 90% of the cool features of C# whatever it is now, not even LINQ, the bread and butter of C# programmers.
Java up to 1.4 didn't have generics, closures, streams, modules, and tons of other stuff besides. Soon it will be getting many more.
Is it a different language for that?
Thing is, adding and/or removing features may have an impact on the implementation, can potentially introduce subtle changes to the semantics of the existing constructs and therefore their behavior at run time, have general performance implications (e.g. due to a change in what optimizations are possible), etc. Is it "the same language"? Not quite. It is a "super-language," at best. If it's 100% backwards compatible, that is (which is not guaranteed).
Modern Fortran looks completely different from the old school FORTRAN77 most people probably imagine. Gone are the days of fixed-format, where the columns actually mattered, and gone are the days of unreadable ALL CAPITAL LETTERS, and gone are the days of GOTO.
I developed a Fortran implementation of Python's argparse[0] recently to use for another project. The code is nothing like the monstrous spaghetti code of days past---although I do still obsessively line up my code in columns, this isn't important.
[0] https://gitlab.com/bwearley/f-clap