Month: April 2016

Gfortran 6.1

Gfortran 6.1 (part of GCC) has been released. The release notes don’t say much with respect to Fortran: The MATMUL intrinsic is now inlined for straightforward cases if front-end optimization is active. The maximum size for inlining can be set

Tagged with: ,

Fortran & C Interoperability (Part 2)

Here’s another example using the C interoperability features of modern Fortran. First introduced in Fortran 2003, this allows for easily calling C routines from Fortran (and vice versa) in a standard and portable way. Further interoperability features will also be added

Tagged with: , ,

C++ vs Fortran (Part 3)

Built-in high-level support for arrays (vectors and matrices) using a very clean syntax is one of the areas where Fortran really shines as a programming language for engineering and scientific simulations. As an example, consider matrix multiplication. Say we have

Tagged with: ,

Atom + Fortran

This newfangled Atom hipster text editor is really a nice editor for Fortran when you install these two plugins: language-fortran — Syntax highlighting for Fortran. linter-gfortran — A linter plugin for Linter, using gfortran to lint Fortran code. There are tons of other packages too.

Tagged with: ,

Linked Lists

So, I want to have a basic linked list manager, written in modern Fortran (2003/2008). Of course, Fortran provides you with nothing like this out of the box, but it does provide the tools to create such a thing (within

Tagged with:

C++ vs Fortran (Part 2)

Here is some C++ code (from actual NASA software): Here is the same code translated to Fortran: 😀 References N. Maclaren, Why (and Why Not) to Use Fortran Instead of C++, Matlab, Python etc, University of Cambridge Computing Service, June 2012. Daniel

Tagged with: , ,