In 2025, I still have flashbacks of Fortran 77 common structure and the bug I had to fix in 2000. The bugs were an epic battle.
Also the language is 68 years old - it was created in 1957. You were messing with F77? so that's 48 years from two standards. F90 improves a lot of the clunky structure. The latest standard of FORTRAN is FORTRAN 23 - only two years ago. Intel offers a free version. Visual Studio can install it through the marketplace, however it can be a pain to get running at first.
As you mentioned, numbering by tens leaves room to stick numbers in between. However, it serves another purpose. When using numbers on most or even some lines, a renumbering utility can renumber the existing numbers back to intervals of ten easily on a fixed form. An adequate programmer could write their own (though free versions were plentiful. Numbering them by ten was also useful before taking card to be executed (back then people didn't have desktop computers - you punched cards and took them to the mainframe operator who ran your program when he had time and printed it out). If you dropped your cards, the operator could be paid to sort the cards before running the program.
BTW, the R language is basically a wrapper for FORTRAN.😮
The fun thing about COMMON blocks is there's no checking that you've declared them consistently between subprograms. If the layouts don't match, it will happily reinterpret the memory, like a C union.
Having learned VBA, it looks like it was looking over Fortran's shoulder - it has the same subroutine/function distinction and setting the function name to a value to return it.
Ah Fortran 77. This brings back good memories. I was 20 when Fortran 77 came out. I used it a lot for various college assignments. That was the the time we had to write programs on program paper, mail it to the typists department where the program would be converted to 80-column punch cards. And then wait for a 4-5 days for the printed output to arrive in your inbox. My first output contained one line: “Syntax error in line 1. Illegal character in column 5.” I think you know what that means…
6:23 C has builtin chars that work same thing as CHARACTER here
I do not know why, but ChatGPT gave you a very old Fortran style. These days, it's simpler. We share the scope using the contains statement, like this: module basic implicit none integer, parameter :: par = 1 contains integer function func(a) result(b) integer :: a b = a + par end function func end module basic Program Hello use basic implicit none write(*,*) func(2) End Program Hello
Cool video, keep it up
Fortran is a prime example of ...just because you can do fortran 77 in modern fortan, does not mean you should. Apply some self-control...
There are default vars in fortran. Default integers is i,j,k,l,m,n rest is float as far as I know
5:54 The reason they are doing that is not at all for parsing, it's because fortran was made to work with punch cards, what the hell is chat-GPT telling you lmao
Original FORTRAN was in 1957 - C did not yet exist. C was created in the 70s. Variables were "declared" by their name. Integers had to start with the letters I-N. All the other variables were assumed real unless assigned as strings. This changed in FORTRAN IV and later. Many structured programming constructs were massively extended over the years. F77 wasn't bad but had limitations. Proper SP programming was much easier in F90 and was easier to learn. I taught F90 at uni and there was a "Cliff Notes" type booklet that taught students everything they needed to get working in three hours. Old BASIC was derived from that largely, with universities wanting to justify the budgets required to get bigger systems by having more users capable of programming on the systems. People from multiple majors could do research and perform analytical and statistical calculations with ease. FORTRAN could do the math, but original FORTRAN from the 50s/60s was not intuitive to people who were not math majors.
The "fixed form" format assumed punch cards. FORTRAN is actually really easy if you have programmed in C and if you use f90 there are plenty of modern additions that make things easier.
I have to disagree with liking "LOGICAL" instead of "BOOLEAN". Boolean logic has been a thing for such a long time in mathematics and there are are many other forms of logic in maths. It's better to be specific to my mind.
Fortran is older than c... fortran is from the 50s
"I don't know what the language of the year 2000 will look like, but I know it will be called Fortran." —Tony Hoare 1982
you can play most games on linux without huge performance caveats.
@nathaniels8734