Ada 95 Quality and Style Guide Chapter 3

Chapter 3: Readability - TOC - 3.1 SPELLING

3.1.1 Use of Underscores

guideline

  • Use underscores to separate words in a compound name.

  • example
    Miles_Per_Hour
    Entry_Value
    

    rationale

    When an identifier consists of more than one word, it is much easier to read if the words are separated by underscores. Indeed, there is precedent in English in which compound words are separated by a hyphen or a space. In addition to promoting readability of the code, if underscores are used in names, a code formatter has more control over altering capitalization. See Guideline 3.1.3.


    < 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