see: file:/export/www/ada-doc/style_guide/contents.html (refered to as Ada QSG (Ada Quality and Style Guide)).
Exceptions to the rules mentioned there are shown in bold italics.
Leave at least one blank space in the following places. More spaces may be required for the vertical alignment recommended in subsequent guidelines.
Do not leave any blank spaces in the following places, even if this conflicts with the above recommendations.
Use emacs Ada-mode for indentation of source lines.
-- --------------------------------------------... -- Checks for membership -- -- Reference: see page 78 of the design manual for further information -- --------------------------------------------... function Is_In_Rfg (The_Rfg : in Rfg; The_Node : Node_Ptr) return Boolean; -- Checks if 'The_Node' is included in 'The_Rfg' -- Status: tested -- Precond: Init('The_RFG'), 'The_Node' != null -- Postcond: true function Is_In_Rfg (The_Rfg : in Rfg; The_Edge : Edge_Ptr) return Boolean; -- Checks if 'The_Edge' is included in 'The_Rfg' -- Status: tested -- Precond: Init('The_RFG'), 'The_Edge' != null -- Postcond: true
Make reserved words and other elements of the program visually distinct from each other.
-- computes the X-factor -- Note: loop necessary due to repeat-until structure of the problem loop X_Factor := Sci_Fi + 500; -- take galactic drift into account (refering to the previous line!) X_Factor := X_Factor * Beam_Constant; -- effect of Beam's constant exit when Finished (X_Factor); end loop;
Use standard file headers provided in bauhaus/Ada-Code/doc/standard_header_ad[bs].
function Is_In_Rfg (The_Rfg : in Rfg; The_Node : Node_Ptr) return Boolean; -- Checks if 'The_Edge' is included in 'The_Rfg' -- Status: tested -- Precond: Init('The_RFG'), 'The_Edge' != null -- Postcond: true -- Raises: 'Not_In_Rfg' iff 'The_Edge' = null -- Effects: Increments 'Calls_So_Far' by one. -- Notes: This is a very long notice on the specialities of this very -- important function 'Is_In_Rfg' to show how the text in a very -- verbose description is formatted!
-- <you may never omit the purpose description!> -- Status: tested -- Precond: false -- Postcond: true -- Raises: nothing -- Effects: no effects on global state -- Notes: assume the worst!
function Is_In_Rfg (The_Rfg : in Rfg; The_Node : Node_Ptr) return Boolean is -- Checks if 'The_Node's 'RFG_Pointer' equals 'The_RFG' -- Notes: This is a very long notice on the implementation specialities -- of this very important function 'Is_In_Rfg' to show how the -- text in a very verbose description is formatted! -- Caution: Modifies global state!