ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339
Rep:
Fotran95 vs Fortran 2003/2008
Well I want to learn fortran but it seems like there are two standards Fortran95 and Fortran2003/8.
I have the 95 librays with me but don't want to start readn till I get some opinions!
Well what are the ups and downs of each?
MinGW for winxp and whatever compiler comes with code::blocks Fortran Project for lubuntu.
Fortran 2003/2008 added extensive language features over Fortran 90/95, so it will give you more flexibility to use different programming paradigms. There is also a strong incentive to maintain backwards compatibility in Fortran despite all the changes, as there are many important legacy projects.
So it depends on your purpose for learning it. If it is to understand historical code, then it will be quicker to learn one of the older versions of Fortran, but if it is to make use of it as a contemporary programming language, then choose a recent standard.
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339
Original Poster
Rep:
Well I (after you very convincing post) choose 2008 but am having trouble finding the compiler (have MinGW base but can't find 2008 fortran compiler) and the libraries. Do you where a tarball of them is kept? (for MinGW, and I have 7Zip so tarball issues are a thing of the past!)
Generally the GNU compilers implement as many features as they can, and then control conformance to a particular standard using the '-std' option, in this case '-std=f2003' (see http://gcc.gnu.org/onlinedocs/gfortr...t-Options.html).
Many of the 2003 and 2008 features have been implemented; it is quite usable, but not complete.
These features have been around for several versions of gfortran, so just grab the latest MinGW version you can (ignore the 'Fortran 90' description; what is of interest is the version number). The MinGW howto has a link to 4.5.2, which should have enough of the Fortran 2003 features to get started.
Last edited by neonsignal; 11-23-2011 at 10:38 PM.
There is a lot of information about Fortran at http://fortran.com/ -- I picked up a lot of free tools from there.
A usenet group that may of use is comp.lang.fortran. The group is fairly high traffic, and has a number of very knowledgeable people (some involved in the standard, some in writing compilers). It is best to use a feed that eliminates spam (Google groups, for example, are not useful for that). I use the pan newsreader, and the feed from my ISP seems very clean.
The best all-round free Fortran compiler I have found is ifort from Intel. You need to assure them that your intended use is personal in order to obtain a free license. You could start here (very large web site) -- http://software.intel.com/en-us/ I also keep available gfortran, and g95 for comparison, benchmarking, isolation of errors, etc. I don't use many of the leading-edge features of Fortran, so I most often use gfortran in the Fortran-77 and Fortran-90 modes. For Fortran-77 (and some Fortran-90) a very useful semantic tool is ftnchek, http://www.dsm.fordham.edu/~ftnchek/
All this is from a Linux perspective. If you are using Windows, then I don't how much of the above is useful in that context.
I'm involved in a study group on Clever Algorithms -- http://www.cleveralgorithms.com/ -- all algorithms are presented in runnable code, but in Ruby. Many of the other folks don't really want to learn another language, so they are trying to implement the algorithms in Java, Mathematica, etc. (under Windows), and I'm trying to do so in Fortran (under Linux). It's slow going.
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339
Original Poster
Rep:
I get the MinGW fortran stuff.
And: I can't use the intel compilers; I am trying to setup a little open source, easy to read website for simple CLI programs written in C,C++ , and the Newest: Fortran.
Thank you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.