Skip to content

Commit 7a305c1

Browse files
committed
updated according to #167
1 parent 101ca72 commit 7a305c1

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

STYLE_GUIDE.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,25 @@ focus on the semantics of the proposed changes rather than style and formatting.
4242
* Where conventional and appropriate shortening of a word is used then the underscore may be omitted,
4343
for example `linspace` is preferred over `lin_space`
4444

45-
## Order of attributes
45+
## Attributes
4646

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:
4850

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
5364

5465
## End <scope> block closing statements
5566

0 commit comments

Comments
 (0)