Changes between Version 16 and Version 17 of doc/tec/developerrules/palmstandard
- Timestamp:
- Nov 13, 2018 5:41:05 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
doc/tec/developerrules/palmstandard
v16 v17 213 213 }}} 214 214 * '''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 USEstatements '''+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''')\\\\ 217 217 * '''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 {{{::}}}\\\\ 222 222 * '''1 blank line''' between enclosed/unrelated blocks of instructions, assignments, clauses, statements, etc. 223 * '''2 blank lines''' in front of each SUBROUTINEwithin a MODULE223 * '''2 blank lines''' in front of each {{{SUBROUTINE}}} within a MODULE 224 224 225 225 '''__Whitespaces between brackets''' 226 226 (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) 229 229 230 230 \\\\\\\\\\\\\\\\\\\\\\\\ … … 238 238 * In general: '''1 whitespace''' everywhere and '''3 whitespace''' for each indentation level 239 239 * 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]) 243 243 244 244 … … 251 251 '''Fig. 4''' Alignment example. Click to enlarge. 252 252 }}} 253 * Block-wise alignment of continuation line mark '''&'''254 * Alignment of ONLYlists253 * Block-wise alignment of continuation line mark {{{&}}} 254 * Alignment of {{{ONLY}}} lists 255 255 * At least block-wise alignment for same type/group of declaration statement 256 * Alignment of message_stringvalues257 * 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 259 259 260 260 == (5.3) Alphabetical sorting == 261 * Members in ONLYlists 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) 264 264 * Variables in declaration statements (see Fig. 4) 265 265