Fortran in the 80s: Viability, Compilers & Changes

  • Fortran
  • Thread starter Kevin McHugh
  • Start date
In summary: Finish.If you installed the compiler correctly, you should now be able to open a command prompt (cmd.exe) and type gfortran.exe -v to see what version of the compiler you have.You can also type gfortran.exe -? for a list of command-line options.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.First, you are also going to need a decent text editor like Notepad++; go ahead and install that too. Then, just follow the
  • #1
Kevin McHugh
318
164
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
  • #2
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.
 
  • #3
Fortran iv was the standard in the 70's and for Gcos 6000 systems it was Fortran-Y an extended version of iv.
 
  • #4
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)
 
  • #5
Mark, that link confused the heck out of me. Where is the link to download the compiler? I am using Windows Vista.
 
  • #6
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.
 
  • #7
  • #8
http://www.personal.psu.edu/hdk/fortran.html
 
  • #9
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.
 

1. What is Fortran and why was it important in the 1980s?

Fortran is a programming language that was developed in the 1950s for scientific and engineering applications. In the 1980s, it was widely used in these fields due to its efficient and fast computation capabilities, making it a crucial tool for scientific research and data analysis.

2. How viable was Fortran in the 1980s compared to other programming languages?

In the 1980s, Fortran was still a popular and widely used programming language, especially in the scientific community. However, it faced competition from newer languages such as C and Pascal, which offered more modern features and were gaining popularity in other industries.

3. What changes were made to Fortran in the 1980s?

In the 1980s, several changes were made to Fortran to improve its capabilities and keep up with the advancements in computer technology. These changes included the introduction of structured programming features, improved support for character strings, and the development of new compilers to optimize its performance.

4. What were the major challenges faced by Fortran in the 1980s?

One of the major challenges faced by Fortran in the 1980s was the need to adapt to the evolving computing landscape. With the rise of personal computers, Fortran had to compete with newer and more user-friendly programming languages. Additionally, the language had to keep up with the increasing demand for more powerful and efficient programs.

5. Is Fortran still used today?

Yes, Fortran is still used today, although its popularity has declined compared to other programming languages. It is still widely used in scientific and engineering applications, particularly in fields such as weather forecasting, computational fluid dynamics, and high-performance computing.

Similar threads

  • Programming and Computer Science
12
Replies
397
Views
13K
  • Programming and Computer Science
Replies
4
Views
4K
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
7
Views
4K
  • Programming and Computer Science
Replies
8
Views
2K
  • Programming and Computer Science
Replies
2
Views
3K
  • Programming and Computer Science
Replies
5
Views
4K
  • Programming and Computer Science
Replies
15
Views
2K
Back
Top