Fortran intent(inout) versus omitting intent

According to The Fortran 2003 Handbook by Adams, et al., there is one difference between an intent(inout) argument and argument without specified intent. The actual argument (i.e., in the caller) in the intent(inout) case must always be definable. If the intent is not specified, the argument must be definable if execution of the subroutine attempts … Read more

Fortran SAVE statement

In principal when a module goes out-of-scope, the variables of that module become undefined — unless they are declared with the SAVE attribute, or a SAVE statement is used. “Undefined” means that you are not allowed to rely on the variable having the previous value if you again use the module — it might have … Read more

Fortran 90 kind parameter

The KIND of a variable is an integer label which tells the compiler which of its supported kinds it should use. Beware that although it is common for the KIND parameter to be the same as the number of bytes stored in a variable of that KIND, it is not required by the Fortran standard. … Read more

Why is fortran used for scientific computing? [closed]

Fortran is, for better or worse, the only major language out there specifically designed for scientific numerical computing. It’s array handling is nice, with succinct array operations on both whole arrays and on slices, comparable with matlab or numpy but super fast. The language is carefully designed to make it very difficult to accidentally write … Read more

Learning FORTRAN In the Modern Era

You kind of have to get a “feel” for what programmers had to do back in the day. The vast majority of the code I work with is older than I am and ran on machines that were “new” when my parents were in high school. Common FORTRAN-isms I deal with, that hurt readability are: … Read more