Previous topic |
Next topic |
Ada Home Page |
Index
Comments
Lines starting with -- are ignored by the compiler
-- a simple ada demonstration program to display
They help someone reading a program to understand it
Good comments:
- are always correct and up to date
- conform to usual conventions of prose
- provide information not immediately obvious
- describe the intended effect of (part of) the program
Minimum comments in any program:
- the name of the program (name)
- who wrote it and when (author & date written)
- description of what the program does (purpose)
- description of any constants or variables
- description of purpose of each segment of code
- assumptions made
In longer programs, comments such as these are needed for each part of the
program
Previous topic |
Next topic |
Ada Home Page |
Index
c-lokan@adfa.oz.au / 12 Feb 96