PDA

View Full Version : Newb Success! Gfortran & G77 in Vista. Step by Step Tutorial.


deltapapazulu
Jul30-09, 06:10 AM
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_Win dows_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.

CFDFEAGURU
Aug4-09, 10:26 AM
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
Aug5-09, 02:09 PM
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?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.

CFDFEAGURU
Aug6-09, 07:49 AM
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.

deltapapazulu
Aug7-09, 12:45 PM
Can I use Visual C++ to programin C?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.

CFDFEAGURU
Aug7-09, 12:48 PM
Here is a link that you can download C# from.

http://www.microsoft.com/express/vcsharp/

deltapapazulu
Aug8-09, 01:01 PM
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.Here is a link that you can download C# from.

http://www.microsoft.com/express/vcsharp/

CFDFEAGURU
Aug8-09, 01:17 PM
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