Fortran in the 80s: Viability, Compilers & Changes

  • Context: Fortran 
  • Thread starter Thread starter Kevin McHugh
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the viability of Fortran as a programming language, particularly in the context of its use in the 1980s for numerical methods courses. Participants explore the evolution of Fortran, the availability of compilers, and the relevance of Fortran in modern programming environments.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • Some participants recall using Fortran in the early 80s, specifically mentioning Fortran 77 and Fortran IV as standards during that time.
  • There is a suggestion that Fortran remains viable, especially in scientific programming, with newer versions like Fortran 90 and Fortran 95 introducing significant changes.
  • Participants mention the availability of compilers, such as gfortran, and provide links for downloading it.
  • One participant expresses interest in using Fortran to solve specific mathematical problems, indicating a desire to engage with the language.
  • There are mentions of alternative programming languages, such as Julia, which some participants believe may be more modern and interesting compared to Fortran.
  • Several participants share resources for learning and practicing programming, including links to problem-solving websites.
  • Technical instructions are provided for installing and using Fortran compilers on Windows, including recommendations for text editors and project setup.

Areas of Agreement / Disagreement

Participants generally agree that Fortran has evolved and remains in use, particularly in scientific contexts. However, there are competing views regarding its relevance compared to newer programming languages, and the discussion includes various opinions on the best practices for using Fortran today.

Contextual Notes

Some participants express confusion regarding the installation and setup of Fortran compilers, indicating potential limitations in their understanding of modern programming environments. There are also varying levels of familiarity with Fortran among participants, which may affect the clarity of technical discussions.

Who May Find This Useful

This discussion may be useful for individuals interested in the historical context of Fortran, those looking to learn or revisit Fortran for scientific programming, and programmers exploring alternatives to Fortran for mathematical problem-solving.

Kevin McHugh
Messages
319
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.
 

Similar threads

  • · Replies 397 ·
14
Replies
397
Views
21K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K