Changes between Version 4 and Version 5 of doc/tec/developerrules/palmstandard


Ignore:
Timestamp:
Nov 2, 2018 7:39:28 PM (6 years ago)
Author:
kanani
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/tec/developerrules/palmstandard

    v4 v5  
    55* Only ASCII characters allowed
    66* Line length limit: 80 (soft) | 120 (hard)
    7 *
    87
    9 == Indenting, spaces & alignment ==
    10 === General module structure ===
     8== Indenting, spaces & line breaks ==
     9=== General module/subroutine structure ===
    1110{{{
    12 #!div style="align:'left'; width: 400px; border: 0px solid; float:right"
    13 [[Image(rules_indent_general.png, 400px, right, margin-right=2, margin-top=0, border=0)]]\\
    14 Indention example with highlighted whitespaces. Click to enlarge.
     11#!div style="align:'left'; width: 450px; border: 0px solid; float:right"
     12[[Image(rules_indent_general.png, 450px, right, margin-right=2, margin-top=0, border=0)]]\\
     13Fig. 1 Indention example with highlighted whitespaces. Click to enlarge.
    1514}}}
    1615
     16* '''0 whitespace''' in front of pre-processor directives
    1717* '''1 whitespace''' before MODULE, CONTAINS, SUBROUTINE (= first indention level)
    1818* '''+3 whitespaces''' for all following indention levels \\(only exception: ONLY list in USE statements '''+4 whitespaces''')\\
    1919
     20* '''1 whitespace''' between individual strings, and between strings and symbols/numbers
     21* '''1 whitespace''' after ''','''\\(only exception: '''0 whitespace''' between array dimensions)
     22* '''1 whitespace''' before '''::''' \\(at minimum, see Sect. [#align Alignment])
     23* '''2 whitespace''' after ''':''' and '''::'''\\
    2024
    21 * '''1 whitespace''' between individual strings
    22 * '''1 whitespace''' after ''','''
    23 * '''1 whitespace''' before '''::''' \\(at minimum, see Sect. [#align Alignment])
    24 * '''2 whitespace''' after ''':'''
    25 
     25* '''1 blank line''' between enclosed instructions, assignments, clauses, statements, etc.
     26* "&" minimum at 80, max at 120
    2627
    2728=== Whitespaces between brackets ===
    2829* '''0 whitespace''' between string and '''('''
    29 * '''1 whitespace''' after '''(''' and before ''')'''\\(only exception: '''0 whitespace''' in declaration statements)
     30* '''1 whitespace''' after '''(''' and before ''')'''\\(only exception: '''0 whitespace''' in dimensions)
    3031
    31 === Alignment ===
     32=== Whitespaces in DO, IF blocks ===
     33
     34\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
     35== Alignment ==
    3236* Linebreaks
    3337* ONLY lists
     38* at least block-wise alignment for same type of declaration
     39* of messages
    3440
    3541\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
     
    4349== Naming conventions ==
    4450
     51== Operators ==
     52* e.g. /=, <, <=, ==, >, >=, etc. (not .GE., .LT., etc)
     53* .AND., .OR., .NOT.
    4554
    46 == New modules ==
    47 '''File header'''
     55== File header ==
    4856* Files always start with a doxygen-readable comment line including the FORTRAN file name.
    4957* This is followed by the license section. If your code originates from another model, please clarify the license and permissions for this code to enter the PALM model system. It might be necessary in that case to add some more information to this header.
    5058* The revisions section will later include short notes of the changes applied to a specific svn revision of this file. The {{{$Id$}}} string is required so that svn knows to generate the respective time stamp for a revision (see existing SOURCE files).
    5159* Finally, involved authors are included, followed by a description of the purpose and functions of the module. If necessary, TODOs, notes and known bugs can be added. The "!>" indicate doxygen-readable comment lines, the "@" marks doxygen variables.
    52 {{{
    53 !> @file new_module_mod.f90
    54 !-----------------------------------------------------------------------------!
    55 ! This file is part of the PALM model system.
    56 !
    57 ! PALM is free software: you can redistribute it and/or modify it under the
    58 ! terms of the GNU General Public License as published by the Free Software
    59 ! Foundation, either version 3 of the License, or (at your option) any later
    60 ! version.
    61 !
    62 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
    63 ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
    64 ! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
    65 !
    66 ! You should have received a copy of the GNU General Public License along with
    67 ! PALM. If not, see <http://www.gnu.org/licenses/>.
    68 !
    69 ! Copyright 2018-2018 Leibniz Universitaet Hannover, <your institution>
    70 !-----------------------------------------------------------------------------!
    71 !
    72 ! Current revisions:
    73 ! -----------------
    74 ! Initial revision
    75 !
    76 ! Former revisions:
    77 ! -----------------
    78 ! $Id$
    79 !
    80 ! Authors:
    81 ! --------
    82 !> @author <Author 1> (<Affiliation>)
    83 !> @author <Author 2> (<Affiliation>)
    84 !
    85 !
    86 ! Description:
    87 ! ------------
    88 !> <Description of the new module>
    89 !>
    90 !>
    91 !> @todo <Enter things that remain to be done>
    92 !> @note <Enter notes on the module>
    93 !> @bug  <Enter known bugs here>
    94 !------------------------------------------------------------------------------!
    95 }}}