Ada 95 Quality and Style Guide Chapter 5

Chapter 5: Programming Practices - TOC - 5.2 PARAMETER LISTS

5.2.1 Formal Parameters

guideline

  • Name formal parameters descriptively to reduce the need for comments.

  • example
    List_Manager.Insert (Element     => New_Employee,
                         Into_List   => Probationary_Employees,
                         At_Position => 1);
    

    rationale

    Following the variable naming guidelines ( 3.2.1 and 3.2.3) for formal parameters can make calls to subprograms read more like regular prose, as shown in the example above, where no comments are necessary. Descriptive names of this sort can also make the code in the body of the subprogram more clear.


    < Previous Page Search Contents Index Next Page >
    1 2 3 4 5 6 7 8 9 10 11
    TOC TOC TOC TOC TOC TOC TOC TOC TOC TOC TOC
    Appendix References Bibliography