Changes between Version 16 and Version 17 of doc/tec/developerrules/palmstandard


Ignore:
Timestamp:
Nov 13, 2018 5:41:05 PM (6 years ago)
Author:
kanani
Comment:

--

Legend:

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

    v16 v17  
    213213}}}
    214214* '''0 whitespace''' in front of pre-processor directives
    215 * '''1 whitespace''' before MODULE, CONTAINS, SUBROUTINE (= first indentation level)
    216 * '''+3 whitespaces''' for all following indentation levels \\(only exception: ONLY list in USE statements '''+4 whitespaces''')\\\\
     215* '''1 whitespace''' before {{{MODULE}}}, {{{CONTAINS}}}, {{{SUBROUTINE}}} (= first indentation level)
     216* '''+3 whitespaces''' for all following indentation levels \\(only exception: {{{ONLY}}} list in {{{USE}}} statements '''+4 whitespaces''')\\\\
    217217* '''1 whitespace''' between individual strings, and between strings and symbols/numbers
    218 * '''1 whitespace''' before and after all operators (+, -, *, =, /)\\(exception: '''0 whitespace''' for ** (exponent operator, e.g. u**2) and operators within expressions for array indices, e.g. u(i+1))
    219 * '''1 whitespace''' after ''','''\\(only exception: '''0 whitespace''' between array dimensions, e.g. (i,j,k))
    220 * '''1 whitespace''' before '''::''' \\(at minimum, see Sect. [#align Alignment])
    221 * '''2 whitespace''' after ''':''' and '''::'''\\\\
     218* '''1 whitespace''' before and after all operators (+, -, *, =, /)\\(exception: '''0 whitespace''' for {{{**}}} (exponent operator, e.g. {{{u**2}}}) and operators within expressions for array indices, e.g. {{{u(i+1)}}})
     219* '''1 whitespace''' after {{{,}}}\\(only exception: '''0 whitespace''' between array dimensions, e.g. {{{(i,j,k)}}})
     220* '''1 whitespace''' before {{{::}}} \\(at minimum, see Sect. [#align Alignment])
     221* '''2 whitespace''' after {{{:}}} and {{{::}}}\\\\
    222222* '''1 blank line''' between enclosed/unrelated blocks of instructions, assignments, clauses, statements, etc.
    223 * '''2 blank lines''' in front of each SUBROUTINE within a MODULE
     223* '''2 blank lines''' in front of each {{{SUBROUTINE}}} within a MODULE
    224224
    225225'''__Whitespaces between brackets'''
    226226(see Fig. 2)
    227 * '''0 whitespace''' between string and '''('''
    228 * '''1 whitespace''' after '''(''' and before ''')'''\\(only exception: '''0 whitespace''' for brackets containing array indices)
     227* '''0 whitespace''' between string and {{{(}}}
     228* '''1 whitespace''' after {{{(}}} and before {{{)}}}\\(only exception: '''0 whitespace''' for brackets containing array indices)
    229229
    230230\\\\\\\\\\\\\\\\\\\\\\\\
     
    238238* In general: '''1 whitespace''' everywhere and '''3 whitespace''' for each indentation level
    239239* But: '''2 whitespace'''\\
    240   * between '''DO''' and '''loop index'''
    241   * after '''IF (  )''' --> see {{{CALL}}}, {{{THEN}}}
    242   * in front of and after logical operators (e.g. '''.OR.''', see [#operators list of allowed operators])
     240  * between {{{DO}}} and '''loop index'''
     241  * after {{{IF (  )}}} --> see {{{CALL}}}, {{{THEN}}}
     242  * in front of and after logical operators (e.g. {{{.OR.}}}, see [#operators list of allowed operators])
    243243
    244244
     
    251251'''Fig. 4''' Alignment example. Click to enlarge.
    252252}}}
    253 * Block-wise alignment of continuation line mark '''&'''
    254 * Alignment of ONLY lists
     253* Block-wise alignment of continuation line mark {{{&}}}
     254* Alignment of {{{ONLY}}} lists
    255255* At least block-wise alignment for same type/group of declaration statement
    256 * Alignment of message_string values
    257 * Alignment of expressions between brackets (e.g. in '''IF (  )  THEN''' or in argument list of subroutine calls)
    258 * Alignment of related code, e.g. in complex equations or setting of initial values for variables '''(missing in png)'''
     256* Alignment of {{{message_string}}} values
     257* Alignment of expressions between brackets (e.g. in {{{IF (  )  THEN}}} or in argument list of subroutine calls)
     258* Alignment of related code, e.g. in complex equations or setting of initial values for variables
    259259
    260260== (5.3) Alphabetical sorting ==
    261 * Members in ONLY lists of USE statements (see e.g. Fig. 4)
    262 * Parameters in NAMELISTS (see e.g. initialization_parameters NAMELIST in parin.f90)
    263 * Declaration types (first CHARACTERs, then INTEGERs, etc., see Fig. 4)
     261* Members in {{{ONLY}}} lists of USE statements (see e.g. Fig. 4)
     262* Parameters in {{{NAMELISTS}}} (see e.g. initialization_parameters NAMELIST in parin.f90)
     263* Declaration types (first {{{CHARACTER}}}, then {{{INTEGER}}}, etc., see Fig. 4)
    264264* Variables in declaration statements (see Fig. 4)
    265265