Book contents
- Frontmatter
- Contents
- Source Code Listings
- Preface
- 1 Introduction
- 2 General Principles
- 3 Formatting Conventions
- 4 Naming Conventions
- 5 Documentation Conventions
- 6 Programming Principles
- 7 Programming Conventions
- 8 Input and Output
- 9 Packaging Conventions
- 10 Generic Programming
- 11 Object Orientation
- 12 Parallel Processing
- 13 Numerical Types, Kinds, and Operations
- 14 C Interoperability
- 15 Updating Old Programs
- A Source Code
- B Rule List
- Bibliography
- Index
B - Rule List
Published online by Cambridge University Press: 05 December 2011
- Frontmatter
- Contents
- Source Code Listings
- Preface
- 1 Introduction
- 2 General Principles
- 3 Formatting Conventions
- 4 Naming Conventions
- 5 Documentation Conventions
- 6 Programming Principles
- 7 Programming Conventions
- 8 Input and Output
- 9 Packaging Conventions
- 10 Generic Programming
- 11 Object Orientation
- 12 Parallel Processing
- 13 Numerical Types, Kinds, and Operations
- 14 C Interoperability
- 15 Updating Old Programs
- A Source Code
- B Rule List
- Bibliography
- Index
Summary
This appendix provides the user with a complete list of all the guidelines contained in the book. They are listed in the order of their appearance and grouped by chapter. The page on which each rule can be found in parentheses following the rule.
Chapter 2. General Principles
1. Write programs that are clear to both the reader and the compiler. (3)
2. Write programs that can be efficiently tested. (4)
3. Write programs that will scale to different problem sizes. (5)
4. Write code that can be reused. (6)
5. Document all code changes, keeping a history of all code revisions. (6)
Chapter 3. Formatting Conventions
6. Always use free source form. (9)
7. Adopt and use a consistent set of rules for case. (10)
7.1 Use lowercase throughout. (11)
7.2 Capitalize the names of all user-written procedures. (11)
7.3 Write all named constants using uppercase letters. (12)
7.4 Begin the name of all data entities using a lowercase letter. (12)
8. Use a consistent number of spaces when indenting code. (13)
9. Increase the indentation of the source code every time the data scope changes. (13)
10. Indent the block of code statements within all control constructs. (14)
[…]
- Type
- Chapter
- Information
- Modern FortranStyle and Usage, pp. 308 - 320Publisher: Cambridge University PressPrint publication year: 2011