Question:
do you know of any free and easy to use fortran compiler for a beginner?
2011-10-25 00:50:22 UTC
I am about to start learning the FORTRAN 2003 language on my own for the first time. I borrowed " a textbook on FORTRAN 2003" to help me learn. but now I am looking for a free easy to use compiler. Any suggestions? The operating system that I have on my computer is Windows 7 professional. I saw gfortran (a free compiler online) and downloaded their installation files, however it doesn't come with any instructions on how to install it (and the gfortran website doesn't seem to be made for novice FORTRAN programmers); that's why i am looking for a simple easy to download and use compiler. thanks
Three answers:
Vincent G
2011-10-26 11:40:18 UTC
Gfortran is an offshoot of the original GNU Fortran. In my performance tests I found it to produce code that was significantly faster than the old GNU G77, re-establishing Fortran as producing the fastest code (by a factor that could reach 2 when all optimize are turned on) than anything else (lately, the GNU code was not that great for Fortran, with a code that was about as fast as C; but Fortran is and will always remain better at pure numeric calculations, because it can be better optimized than any other language. I guess you have to get something for all the boundary limits that Fortran does not do; those checks do cost CPU cycles.)



However, GFortran does not come with an integrated development environment; that would be of limited value anyway since most of that stuff is for setting nice GUI, which Fortran is not known for. What you do with Fortran is you write your code using a text editor (try 'emacs' a free download, as it will highlight some key words and comments using colors when the Fortran source code edition mode is turned on) and once you have your code all built up, you compile it using either a direct compile command in a C-shell window, or use a make file, again called on by a command on the C-shell window. Alternatively, I think you can bind the compiler command to 'emacs (I have not done so myself, I don't mind going to the C-shell for at the prompt command execution).



Just make sure that your path is such that the GFortran command will be found. That is the only installation issue.
Rainmaker
2011-10-25 11:23:57 UTC
GCC (GNU Compiler Collection) includes a Fortran compiler.
Laurence I
2011-10-25 08:24:12 UTC
most compilers like that dont need installing

you operate them in a dos box

you put binaries and exe files in a rigid folder structure

eg \bin ....\include...\source.......etc etc



you then use a batch file to compile, with or without command line

switches to create listing files or not



eg you might say

FC MyFile

and the batch may translate that into



Fortaran MyFile.SRC MyFiile.OBJ MyFile.LST



so thats about it.



what you may have been hoping for was some whizzy self installing

graphical user interface, well unlucky.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...