LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Fotran95 vs Fortran 2003/2008 (https://www.linuxquestions.org/questions/programming-9/fotran95-vs-fortran-2003-2008-a-914982/)

Zssfssz 11-22-2011 07:06 PM

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.

neonsignal 11-23-2011 04:22 PM

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.

Zssfssz 11-23-2011 10:10 PM

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!)

neonsignal 11-23-2011 10:36 PM

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.

makyo 11-24-2011 08:00 AM

Hi.

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.

Good luck ... cheers, makyo

Zssfssz 11-24-2011 02:59 PM

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.


All times are GMT -5. The time now is 08:20 PM.