Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
Seitosh
Commits
9cbd6d45
Commit
9cbd6d45
authored
Dec 24, 2018
by
thomas.forbriger
Browse files
contrib [DOC]: add notes to style guide
parent
74b9cb31
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/README.style-guide
View file @
9cbd6d45
...
@@ -2,7 +2,6 @@ this is <README.style-guide>
...
@@ -2,7 +2,6 @@ this is <README.style-guide>
============================================================================
============================================================================
A style guide for Fortran, C, and C++ coding conventions
A style guide for Fortran, C, and C++ coding conventions
--------------------------------------------------------
--------------------------------------------------------
$Id: $
============================================================================
============================================================================
A common coding style to be used in all source code improves readability and
A common coding style to be used in all source code improves readability and
reduces the risk of error. Different packages in Seitosh follow different
reduces the risk of error. Different packages in Seitosh follow different
...
@@ -15,6 +14,10 @@ General:
...
@@ -15,6 +14,10 @@ General:
- use indentation to mark loops and if-then-else clauses
- use indentation to mark loops and if-then-else clauses
- use only 2 characters of whitespace per indentation level
- use only 2 characters of whitespace per indentation level
- NEVER use tab-characters for indentation
- NEVER use tab-characters for indentation
- lines shouldn’t exceed a length of 79 characters
it’s not because we’re mainly using VT100 terminals while developing,
it's rather because the diffs look nicer on short lines, especially in
side-by-side mode.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Denomination of variables, classes, etc. (C++):
Denomination of variables, classes, etc. (C++):
...
@@ -25,6 +28,9 @@ Denomination of variables, classes, etc. (C++):
...
@@ -25,6 +28,9 @@ Denomination of variables, classes, etc. (C++):
if there are more than one typnames necessary than use the
if there are more than one typnames necessary than use the
typenames C1, C2, ...
typenames C1, C2, ...
- class names start with a capital character
- class names start with a capital character
use CamelCase for class names
- use snake_case for variables and functions
- names of constants begin with c_
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Other C++ conventions:
Other C++ conventions:
...
@@ -38,6 +44,18 @@ Other C++ conventions:
...
@@ -38,6 +44,18 @@ Other C++ conventions:
3. static member functions
3. static member functions
4. member data
4. member data
============================================================================
Commandline options
-------------------
common commandline options should be:
--type to specify input file type for programs which do not produce
seismogram output data file
--itype to specify input file type
--otype to specify output file type
--verbose to produce verbose terminal output
--overwrite replace existing output file
============================================================================
============================================================================
File names
File names
----------
----------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment