File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -42,14 +42,25 @@ focus on the semantics of the proposed changes rather than style and formatting.
42
42
* Where conventional and appropriate shortening of a word is used then the underscore may be omitted,
43
43
for example ` linspace ` is preferred over ` lin_space `
44
44
45
- ## Order of attributes
45
+ ## Attributes
46
46
47
- Similiar to the guidlines for indentation and whitespace, specifiying the order of appearance of attributes can help reviewing code and git-diffs.
47
+ * Always specify ``` intent ``` for dummy arguments
48
+ * Don't use ``` dimension ``` attribute to declare arrays because it is less verbose.
49
+ Use this:
48
50
49
- 1 . ``` dimension ```
50
- 2 . ``` allocatable ```
51
- 3 . ``` intent(intent-spec) ```
52
- 4 . ``` optional ```
51
+ ```
52
+ real, allocatable :: a(:), b(:,:)
53
+ ```
54
+
55
+ instead of:
56
+
57
+ ```
58
+ real, dimension(:), allocatable :: a
59
+ real, dimension(:,:), allocatable :: b
60
+ ```
61
+
62
+ When defining a lot of arrays of the same dimension ``` dimension ``` can be used as an exception.
63
+ * If ``` optional ``` attribute is used to declare a dummy argument, it should follow the intent attribute
53
64
54
65
## End <scope > block closing statements
55
66
You can’t perform that action at this time.
0 commit comments