Should I learn Fortran 2003 or 2008 before learning Fortran 2018?

Can I learn Fortran 2018 without having any background in previous Fortran versions? Professors in most of colleges in Nigeria are ardent lover of Fortran and MATLAB. This makes it compulsory for department in Faculty of Technology undergraduates to take Fortran as first programming language, with the exception of folks with background knowledge in other languages.

Eseun.

2 Likes

@Believe yes, you can learn Fortran 2018 without having a background in older versions.

Your professors are making a good choice. Modern Fortran is a great language to learn as a first programming language. You can learn from the resources at https://fortran-lang.org/learn/. We plan to greatly improve the tutorials and documentation there, but there should be enough resources to learn Fortran already.

3 Likes

@Believe,

Viva Nigeria! It’s great to read about the popularity of Fortran with professors in colleges there.

Re: Fortran 2018 vs previous versions, you may note the thinking now appears to be more in terms of modern Fortran as signifying versions since Fortran 90 revision or since 2003 depending on the person. And to start with ‘modern Fortran’ generally.

So you will see a lot of books use the term ‘modern Fortran’ in the title - see this link by @milancurcic, one of the founders of this site for a great new book on Fortran which you can start learning without any background in prior versions of Fortran.

There are other books also such as by Chapman; by Metcalf et al.

And you may want to keep in mind short video tutorials on YouTube in conjunction with open-source (free) development tools such as gfortran with Code::Blocks:


3 Likes

@FortranFan
@certik
Thank you for your supports. I’ll promote this community amongst other Fortran enthusiasts.

6 Likes

Thank you @Believe, that would be awesome. We are looking for more users. Welcome!

Welcome @Believe,

the answer is YES, you should begin by the current Fortran standard. You will learn later, when needed, the “Deleted and obsolescent features” listed in the Annexe B of the Fortran 2018 standard:

Fortran 2018 Standard Interpretation Document J3/18-007r1 F2018, specification of the base Fortran 2018 language

This link is listed on the https://fortran-lang.org/learn/ page.

3 Likes

Hi I am from India. Here my professors are also Fortran enthusiasts. But they stick to Fortran 90 in FORTRAN 77 style. I learnt a good amount of python and C++ (only because the software that I work demands it). However my actual learning and productivity is in Fortran only. I am concerned about the features of Modern Fortran (2018) that compilers support. I have Intel Parallel studio cluster edition. Does it support most of the features of Modern Fortran. If not what type of features of Modern Fortran it doesn’t support. Of course I have read Intel Fortran 2018 support. But I have to learn all those features before I realize what they meant for my usage. Can somebody explain which “type” of features are not supported. I am asking “type of features” not the features themselves because it may be difficult to explain everything here. Finally how safe it is for an average usage (I mean not much of the parallel features) of Modern Fortran to take up 2018 revision ? I am using it for developing a Finite Element (FEM) Project with some visualizations. C++ has proven it’s capability in large FEM projects, in fact almost all the open source FEM projects are in C++. I am planning a Fortran version with some additional capabilities.
Thank you.

1 Like

Yes, but the question is what parts of the language to focus on. The basics, I’d say, are variables, fixed-size arrays, allocatable arrays, IF blocks, DO loops, SELECT CASE, formatted input and output, functions, subroutines, procedure argument INTENT, and modules. Then come derived types. These are all part of Fortran 95, and are covered in books and tutorials on Fortran 95. The ability to use ALLOCATABLE arrays rather than POINTERs in many contexts is an important feature of Fortran 2003, and one should use a reference that covers this. Object orientation using CLASS and parallel programming with coarrays are features of Fortran 2003 and later standards. Maybe one should defer learning about CLASS until one knows how to use derived types and defer learning about coarrays until one’s programs are running too slowly. So a tutorial that says it covers Fortran 95 or even Fortran 90 can be a good starting point.

1 Like