Fortran Newb Success Gfortran & G77 in Vista. Step by Step Tutorial.

  • Thread starter Thread starter deltapapazulu
  • Start date Start date
  • Tags Tags
    Gfortran Tutorial
Click For Summary
SUMMARY

This discussion focuses on the installation and initial usage of Gfortran and G77 on Windows Vista, along with a query about suitable IDEs for beginners. The user successfully installed the compilers, created a simple "Hello World" program, and executed it via the command prompt. The consensus among participants is that while Fortran is still used for legacy applications, modern programming languages like C/C++ are recommended for new learners, with Visual Studio 2008 C++ Express being suggested as a suitable IDE.

PREREQUISITES
  • Basic understanding of command prompt usage
  • Familiarity with programming concepts
  • Knowledge of Fortran syntax and structure
  • Awareness of integrated development environments (IDEs)
NEXT STEPS
  • Research Visual Studio 2008 C++ Express installation and features
  • Learn C/C++ programming fundamentals
  • Explore modern IDEs for C/C++ development
  • Study the differences between console applications and GUI applications
USEFUL FOR

This discussion is beneficial for novice programmers, particularly those interested in transitioning from Fortran to modern programming languages like C/C++, as well as anyone seeking guidance on IDE selection and setup.

deltapapazulu
Messages
84
Reaction score
13
Now that I have a suitable Fortran compiler I wonder what would be a good IDE. Anyway here is what I did:

I am new to programming and command prompt usage. Here is the tutorial I used, then an added step that was necessary not covered in the link:

http://www.neuralwiki.org/index.php?title=Guide_to_installing_Fortran_in_Windows_Vista

(1). I downloaded/installed Gfortran and G77, setup PATHS, following instructions in link. Then I copied and pasted the following Hello World program in into the notepad text editor that comes with Vista:

The indentation is 6 spaces.
____________________________________________


PROGRAM HELLOW
WRITE(UNIT=*, FMT=*) 'Hello World'
END

____________________________________________


(2). Saved the notepad doc as test.f and then in command prompt from the folder I saved it in typed ' gfortran test.f '.
It created a .exe file called 'a' in same folder.

(3). In prompt I typed ' gfortran test.f -o test.exe '
Then entered and then ran it by merely typing ' test '.

This is what it looked like in prompt:

> gfortran test.f
> gfortran test.f -o test.exe
> test
Hello World


So now that I have a working Fortran compiler what I would like to know is what would be the best IDE, figuring in the fact that I am a total novice.
 
Technology news on Phys.org
There is no free integrated development environment (IDE) for FORTRAN. You should switch a more modern code like C++ and use the Visual Studio C++ Express edition to teach yourself a modern language.
 
I'm listening. I am open to advise on this. So you are saying that Fortran's relevance is waining, and sees less relavance among the next generation of science programmers?
CFDFEAGURU said:
There is no free integrated development environment (IDE) for FORTRAN. You should switch a more modern code like C++ and use the Visual Studio C++ Express edition to teach yourself a modern language.
 
deltapapazulu said:
I'm listening. I am open to advise on this. So you are saying that Fortran's relevance is waining, and sees less relavance among the next generation of science programmers?

Yes FORTRAN is dated however, it is still used due to legacy in programs, but C/C++ is the language you should spend time learning. C/C++ are used all the time in the scientific community and they can be used outside of the scientific community just as well. Try that with FORTRAN. Trust me, I spend weeks of my life writing older (circa 1974 - 1982) FORTRAN code over again (with many new features) in C/C++.

You can download the IDE from Microsoft for fee. It is Visual Studio 2008 C++ Express. Don't worry about not having MFC capability you can do a lot with this version.
 
Can I use Visual C++ to programin C?
CFDFEAGURU said:
Yes FORTRAN is dated however, it is still used due to legacy in programs, but C/C++ is the language you should spend time learning. C/C++ are used all the time in the scientific community and they can be used outside of the scientific community just as well. Try that with FORTRAN. Trust me, I spend weeks of my life writing older (circa 1974 - 1982) FORTRAN code over again (with many new features) in C/C++.

You can download the IDE from Microsoft for fee. It is Visual Studio 2008 C++ Express. Don't worry about not having MFC capability you can do a lot with this version.
 
Thanks for taking the time to answer me. I really am doing this stuff by myself. In fact, I started another thread elaborating more broadly on my situation.
CFDFEAGURU said:
Here is a link that you can download C# from.

http://www.microsoft.com/express/vcsharp/
 
Last edited by a moderator:
Good, never stop learning. I have been teaching myself programming and general relativity for years. Sometimes the progress is slow, especially on the general relativity track but I never give up. When it comes to programming in todays' environment it can be difficult to know if you have selected the right path. Basically, what type of programs do you wish to write? Trying to write windows form programs (which are the ones you are familiar with that allow you point and click) that involve a GUI (graphical user interface) can be extremely difficult and time consuming for the most basic of programs. Now if you want to write console applications where the user manualy enters in data when prompted by the program and the output is nothing more than a number or a set of numbers, it can be much easier. Some of the programs I write that solve Ordinary Differential Equations (ODE) have to run out of the compilier and there is no user interface other than to see the results on the output screen.
What are you interested in writing? Let me know I will help you out.

Matt
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
9K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
14K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 7 ·
Replies
7
Views
5K