| 1 | |
| 2 | == Coding standards: Sample header for source code files == |
| 3 | |
| 4 | The header has the following sections: |
| 5 | |
| 6 | 1. GNU License statement. |
| 7 | 2. `program|subroutine|function|module|...` statement, possibly followed by a comment line indicating the intent (`i|o|io`) of variables in the parameter list |
| 8 | 3. Short description of the function of this progamme unit, original author (full name) and date |
| 9 | 4. List of changes with name or acronym, date, content |
| 10 | 5. List of (important) variables, including pertinent information such as unit of physical quantities, permitted values, definitions and explanations (if possible in one line per variable |
| 11 | |
| 12 | The details of layout and syntax can be taken from the example below. [[BR]] |
| 13 | Further notes: |
| 14 | |
| 15 | - The first line of the License statement shall look like this |
| 16 | {{{ |
| 17 | ! Copyright 1998-20XX |
| 18 | }}} |
| 19 | where 20XX is to be replaced by the year of the last edit. Wherever you still find a list of single years, please replace it. |
| 20 | |
| 21 | - The next 2 lines used to be a list of authors. We have decided to remove it here, Fp authors will be listed elsewhere, either in FLEXPART.f90 or in a separate file. |
| 22 | |
| 23 | - Decorations: Originally all header comment was framed by `*`, 80 chars wides. This had to be changed moving to free format. As it is cumbersome to make a justified r.h.s. line of *, this is not required, but please avoid a ragged line of * (simply leave it open). |
| 24 | |
| 25 | |
| 26 | === GNU License statement === |
| 27 | (without authors, nicer decoration) |
| 28 | |
| 29 | {{{ |
| 30 | !*********************************************************************** |
| 31 | !* Copyright 1998-2015 * |
| 32 | !* * |
| 33 | !* This file is part of FLEXPART. * |
| 34 | !* * |
| 35 | !* FLEXPART is free software: you can redistribute it and/or modify * |
| 36 | !* it under the terms of the GNU General Public License as published by* |
| 37 | !* the Free Software Foundation, either version 3 of the License, or * |
| 38 | !* (at your option) any later version. * |
| 39 | !* * |
| 40 | !* FLEXPART is distributed in the hope that it will be useful, * |
| 41 | !* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 42 | !* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 43 | !* GNU General Public License for more details. * |
| 44 | !* * |
| 45 | !* You should have received a copy of the GNU General Public License * |
| 46 | !* along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. * |
| 47 | !*********************************************************************** |
| 48 | }}} |