Skip to content

Commit d91065d

Browse files
committed
docs: simplify closing statement section
* Recommend using names on end statements * Allow exceptions for very short constructs that can be reasonably assumed to be on one screen, within ~25 lines
1 parent 5eec482 commit d91065d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

STYLE_GUIDE.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,5 @@ focus on the semantics of the proposed changes rather than style and formatting.
4242
## End <scope> block closing statements
4343

4444
Fortran allows certain block constructs or scopes to include the name of the program unit in the end statement.
45-
The convention adopted herein is to __NOT__ include procedure names, `module` names and `program` names in the `end` statement.
46-
There should only ever be one `program` and `module` statement per file and therefore including the name provides no useful information.
47-
An exception to this rule is for procedures (`function`s and `subroutine`s) that are longer than a page of text.
48-
Long procedures often are a sign of poor abstraction, however, sometimes they are necessary.
49-
In such cases, the procedure name may be included in the `end` procedure statement.
45+
The convention adopted herein is to include procedure names, `module` names and `program` names in the `end` statement,
46+
unless the closing statement can reasonably be expected to be on the same screen or page, within about 25 lines.

0 commit comments

Comments
 (0)