Indentation
Indentation is very important for creating well structured self documenting
programs. Programs that are indented properly are easy to understand and most importantly
easy to debug.
House Style
Certain styles of indentation are very easy to understand and use. This particular one
was developed by Dr Bond of Aylesbury Grammar School. It is used by Dr Bond and his students.
The principles of the style are simple:
- The begin of any structure has an end the same distance from the edge of the page.
- Any new code belonging in a structure is placed two spaces in from the begin-end column of that structure.
- Then, else and do commands are treated as if the belong to the iteration or selection statement they are part of.
|