There are many different programming styles, but we will try to give some general guidelines that are fairly non-controversial. To ensure portability, use only standard Fortran 77. The only exception we have allowed in this tutorial is to use lower case letters today. The overall program structure should be modular. Each subprogram should solve a well-defined task.
Many people prefer to write each subprogram in a separate file.
Indentation Always use proper indentation for loops and if blocks as demonstrated in this tutorial. Variables Always declare all variables. Try to stick to maximum 6 characters for variable names, or at the very least make sure the 6 first characters are unique. Use subroutines in such cases. In the declarations, separate parameters, common blocks, and local variables.