Changeset 817 for trunk/DOC/BETA/Chapters/Annex_D.tex
- Timestamp:
- 2008-02-09T15:13:48+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DOC/BETA/Chapters/Annex_D.tex
r707 r817 1 1 % ================================================================ 2 % Chapter Ñ Appendix D :Coding Rules2 % Appendix D Ñ Coding Rules 3 3 % ================================================================ 4 \chapter{ Appendix D :Coding Rules}4 \chapter{Coding Rules} 5 5 \label{Apdx_D} 6 6 \minitoc 7 7 8 8 9 The "model life" is about ten years and its software, composed by about one10 hundred programs, is used by many people who are scientists or students and9 A "model life" is more than ten years. Its software, composed by a few 10 hundred modules, is used by many people who are scientists or students and 11 11 do not necessary know very well all computer aspects. Moreover, a well 12 12 thought-out programme is easy to read and understand, less difficult to … … 26 26 - flexible. 27 27 28 To satisfy part of these aims, OPA is written with a coding standard which 29 is close to the ECMWF rule, named DOCTOR [Gibson,1986]. These rules present 30 some advantages like : 28 To satisfy part of these aims, \NEMO is written with a coding standard which 29 is close to the ECMWF rules, named DOCTOR \citep{Gibson_TR86}. These rules present some advantages like : 31 30 32 31 - to provide a well presented program 33 32 34 - to enable the extraction of several levels of on-line documentation35 36 33 - to use rules for variable names which allow recognition of their type 37 (integer, real, parameter, commonvariables, etc. ) so that debugging is34 (integer, real, parameter, local or shared variables, etc. ) so that debugging is 38 35 facilitated. 39 36 40 \textbf{The program structure} 37 % ================================================================ 38 % The program structure 39 % ================================================================ 40 \section{The program structure} 41 \label{Apdx_D_structure} 41 42 42 43 Each program begins with a set of headline comments containing : … … 61 62 - A program has not more than 200 to 300 lines. 62 63 63 \textbf{Coding conventions} 64 % ================================================================ 65 % Coding conventions 66 % ================================================================ 67 \section{Coding conventions} 68 \label{Apdx_D_coding} 64 69 65 70 - Use of the universal language \textsc{Fortran} 5 ANSI 77, with non … … 106 111 - STOP must be well documented with the name of the subroutine or a number. 107 112 108 \textbf{Naming Conventions.} 113 % ================================================================ 114 % Naming Conventions 115 % ================================================================ 116 \section{Naming Conventions} 117 \label{Apdx_D_naming} 109 118 110 119 The purpose of the naming conventions is to use prefix letters to classify … … 117 126 \begin{center} 118 127 \begin{tabular}{|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|} 128 \hline Type \par / Status & integer& real& logical & character& double \par precision& complex \\ 119 129 \hline 120 Type \par / \par Status & 121 integer& 122 real& 123 logical & 124 character& 125 double \par precision& 126 complex \\ 127 \hline 128 global \par or \par common& 130 public & 129 131 \textbf{m n} \par \textit{but not } \par \textbf{nam}& 130 132 \textbf{a b e f g h o} \textbf{q} \textit{to} \textbf{x} \par but not \par \textbf{sf}& … … 179 181 \end{table} 180 182 %-------------------------------------------------------------------------------------------------------------- 181 182 \textbf{References}183 184 {\small Gibson, J. K., 1986: Standard software development and maintenance. }{\small \textit{Tech. memorandum}}{\small , Operational Dep., ECMWF, Reading, UK.}185
Note: See TracChangeset
for help on using the changeset viewer.