Indentation of two spaces for all block constructs.
Four-space indentation of continuation lines (with some exceptions to clarify structure of long algebraic expressions).
Lines should have no trailing whitespace.
The last line in the file should have one newline, and no additional blank lines.
Lines should be < 80 characters wide, but I was not successful in breaking all over-long lines. The remainder are predominantly line comments that I did not wish to move off their line, not knowing what exactly they referred to.
Spell language keywords in lower case.
All subroutines should declare implicit none
(Enforcing this required explicitly declaring the handful of variables that were implicit.)
Spell block terminators end do, end if, and end subroutine <name>, not enddo or endif. (Emacs was kind enough to automatically insert the subroutine names.)
Commas should be followed by whitespace, as in written natural languages.
(Exception: array subscripts in dense algebraic expressions, as they should be compact enough that the eye groups the array element as one thing.)
The equal sign should be offset with spaces when it means assignment, and not offset when it means value for keyword argument.
Confirmed, using the test suite, that output remains bit-for-bit identical with the version preceding this PR, on my machine.
Fixes #17 as stated, though this is by no means a complete style guide.
Summary of Fortran code style enforced:
implicit none
end do
,end if
, andend subroutine <name>
, notenddo
orendif
. (Emacs was kind enough to automatically insert the subroutine names.)Confirmed, using the test suite, that output remains bit-for-bit identical with the version preceding this PR, on my machine.
Fixes #17 as stated, though this is by no means a complete style guide.