coding_standard.txt 1.34 KB
The code will be compiled with the flag -std2008 i.e. enforce conformance to 
fortran2008 standard. (2008 is required only for the EXECUTE_COMMAND_LINE command).

For updating old fortran software the follownig web page is useful...
http://fortranwiki.org/fortran/show/Modernizing+Old+Fortran

The following guidelines will be followed in the software (note that exceptions
may be made for re-used open source software)

1. Subroutines will be place in MODULES so that the compiler can check the 
   interface between a subroutine and is calling program are consistent
   
2. No TAB characters will be allowed in the source code (not portable)

3. the KIND of real and complex variables will be specified in the MODULE
   type_specifications using selected_real_kind(). 
   real and complex variables are then specified with
   real(dp) :: real_variable_name
   complex(dp) :: complex_variable_name
   
4. Loops, ifs etc will be indented to improve the clarity of the
   code structure
   
5. The length of character strings will be set using the   
   form  character(len=filename_length) NOT character*filename_length
   
6. The SAVE attribute should be included in modules where required - we cannot 
   assume that variables will be saved automatically.
   
7. INTRINSIC NONE will be used in programs and subroutines to ensure that all variables are explicitly declared.