Fortran Fortran in the 80s: Viability, Compilers & Changes

  • Thread starter Thread starter Kevin McHugh
  • Start date Start date
AI Thread Summary
Fortran, particularly Fortran 77, was commonly used in the early 80s for numerical methods courses. The language has evolved significantly, with major updates in Fortran 90 and 95, introducing features like modules and improved data type declarations. Fortran remains relevant, especially in scientific programming, and several compilers are available, including the free gfortran. Users can download gfortran and find resources for installation and usage, including tutorials and problem-solving sites like Project Euler and Rosetta Code. For those interested in modern programming, alternatives like Julia, which is similar to MATLAB, are also suggested. Setting up a Fortran development environment on Windows involves installing a text editor, creating a working directory, and ensuring the compiler is correctly configured in the system's PATH. Comprehensive instructions for installation and initial programming are provided, along with links to additional tutorials.
Kevin McHugh
Messages
318
Reaction score
165
When I was in college back in the early 80s, I took a numerical methods course. We used fortran as the language for our programs. What kind of fortran was that, is fortran still a viable language, and if it is, where can you access compilers? Has it changed much over the years? TIA for your input.

Regards, Kevin
 
Technology news on Phys.org
Kevin McHugh said:
When I was in college back in the early 80s, I took a numerical methods course. We used fortran as the language for our programs. What kind of fortran was that, is fortran still a viable language, and if it is, where can you access compilers? Has it changed much over the years? TIA for your input.
I too took a class in Fortran back in the early 80's. I'm pretty sure that the Fortran we used was Fortran 77.

Based on the number of questions about Fortran that we get here, it seems to be in use a fair amount, particularly in scientific programming. There have been many changes through the years, with significant versions being Fortran 90, Fortran 95, as well as versions newer than that.

There are several compilers around. gfortran is one that you can download for free. If you do a web search for gfortran, you should be able to find a download site.

For information, see https://en.wikipedia.org/wiki/Fortran.
 
Fortran iv was the standard in the 70's and for Gcos 6000 systems it was Fortran-Y an extended version of iv.
 
There were major additions to the language in Fortran 90, including modules and new ways to declare data types. Later versions of the Fortran standard made further additions. See the wikipedia page that Mark44 linked to.

The programming world is now very fragmented in terms of languages for different purposes, compared to c. 1980 when "programming" still mostly meant Fortran in science and COBOL and RPG in business. If you want to "re-learn" programming, you should probably consider what kind of programming you want to do, and choose a language accordingly. I've never heard of a smartphone app written in Fortran. o0)
 
Mark, that link confused the heck out of me. Where is the link to download the compiler? I am using Windows Vista.
 
JT, I just want to play around with it. I always enjoyed writing programs to solve mathematical problems. I was thinking I would like to solve the four particle system,H2, energy as a function of internuclear distance.
 
http://www.personal.psu.edu/hdk/fortran.html
 
If you want to be more modern there's julia a language very similar to matlab. Having programmed in both over the years i think would be more interesting to use.

www.julialang.org
 
  • #10
Kevin McHugh said:
I always enjoyed writing programs to solve mathematical problems.
Whenever I need to pick up a little bit of a new programming language, I try to knock out a few of the problems at this site: https://projecteuler.net/archives

Enjoy!
 
  • #11
TeethWhitener said:
Whenever I need to pick up a little bit of a new programming language, I try to knock out a few of the problems at this site: https://projecteuler.net/archives

Enjoy!

Thanks for the site reference. It looks quite interesting.

then you might like the www.rosettacode.org site where a variety of problems are solved in a bigger variety of programming languages,
 
  • #12
Kevin McHugh said:
I am using Windows Vista

Drilling down from gsal's link, here is the section on Windows binaries for gfortran:

https://gcc.gnu.org/wiki/GFortranBinaries#Windows

I don't use Windows myself, except very occasionally under Parallels Desktop on my Mac, and have never tried to install a Windows compiler for any language. I've used gfortran a bit under both Mac OS and Linux.
 
  • #13
OK, I have downloaded the compiler for 32 bit windows. Now, how do I get to the page where I can write a simple program to test the compiler? God, I feel so old and out of touch.
 
  • #14
Well, first, you are also going to need a decent text editor like Notepad++; go ahead and install that too.

Then, just follow the typical Windows way to a working directory via the file manager, create a text file, open it with Notepad++ and start typing your Fortran program.

Then, you open a DOS terminal and change directories 'til you get to the same working directory where your program is; now, you can compile your program and run it.

This will work if you installed your compiler correctly and it added itself to your PATH environment variable; if not, you need to add the location of your compiler to the PATH manually.
 
  • #15
Here is a complete list of instructions to get this working very quickly.
1. uninstall everything you have already installed today
2. go to http://www.codeblocks.org/ click on "download", "Download the binary release", "Windows XP / Vista / 7 / 8.x / 10" and then "codeblocks-16.01mingw_fortran-setup.exe"
3. run the installer, keep clicking next until it's finished
4. run CodeBlocks, choose the "GNU Fortran Compiler", click "Set as default" and then "OK"
5. click on File/New/Project/Fortran Application
6. click Next, set the project title to whatever you want, set the projects folder to e.g. "My Documents"
7. click Next, make sure GNU Fortran Compiler is selected and then click Finish
8. on the left side you can now see your new project. Click on "Fortran Sources/main.f95"

Now you can modify the code and then click on "Build and run" or press F9.
btw. all your Fortran files should end with .f95 or .f90 to make sure the compiler recognizes them correctly

There are different tutorials out there to help you get started. e.g.
http://www.tutorialspoint.com/fortran/
http://www.fortrantutorial.com/

You can also find tutorial videos on Youtube
 
  • #16
Thank you Dr Zoidberg, you're the man.
 
Back
Top