Pular para o conteúdo
Hub Nexus

Ada Style Guide

An open textbook from Wikibooks, a chapter a page, in reading order.

11 páginasAtualizada

Começar a ler

Seguir significa um e-mail quando uma página é adicionada, nada quando uma página muda.

Seguir significa um e-mail quando uma página é adicionada, nada quando uma página muda.

Páginas

Página 1CC BY-SA 4.0
This requirement is important in the creation of quality products that not only meet user needs but also can be developed on schedule and within estimated cost. This book is intended to help the computer professional produce better Ada programs. It presents a set of specific stylistic guidelines for
Página 2CC BY-SA 4.0
Above all, be consistent across your entire project. An entirely consistent layout is hard to achieve or check manually. Therefore, you may prefer to automate layout with a tool for parameterized code formatting or incorporate the guidelines into an automatic coding template. Some of the guidelines
Página 3CC BY-SA 4.0
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. ### guideline - Represent numbe
Página 4CC BY-SA 4.0
The concept of child packages supports the concept of subsystem, where a subsystem is represented in Ada as a hierarchy of library units. In general, a large system should be structured as a series of subsystems. Subsystems should be used to represent logically related library units, which together
Página 5CC BY-SA 4.0
Inevitably, the requirements change over the lifetime of the system, forcing continual system evolution. Often, these modifications are conducted long after the software was originally written, usually by someone other than the original author. Easy and successful modification requires that the soft
Página 6CC BY-SA 4.0
The concurrent programming features of Ada are designed to make it easier to write and maintain concurrent programs that behave consistently and predictably and avoid such problems as deadlock and starvation. The language features themselves cannot guarantee that programs have these desirable proper
Página 7CC BY-SA 4.0
This chapter does identify the more common portability problems that are specific to Ada when moving from one platform or compiler to another. It also suggests ways that nonportable code can be isolated. By using the implementation hiding features of Ada, the cost of porting can be significantly red
Página 8CC BY-SA 4.0
So this chapter's guidelines are most useful when all of the other guidelines in this book are also applied. Several guidelines are directed at the issue of maintainability. Maintainable code is easy to change to meet new or changing requirements. Maintainability plays a special role in reuse.
Página 9CC BY-SA 4.0
The following definitions are provided in order to make this chapter more understandable. The essential characteristics of object-oriented programming are encapsulation, inheritance, and polymorphism. These are defined as follows in the Rationale (1995, §§4.1 and III.1.2): Inheritance A means for in
Página 10CC BY-SA 4.0
Use the guidelines in this chapter with care; they may be hazardous to your software. The best way to build a system that satisfies its performance requirements is through good design. You should not assume that speeding up your code will result in a visible increase in system execution. In most app
Página 11CC BY-SA 4.0
This chapter presents an elaborate implementation of Edsger Dijkstra's famous [Dining Philosophers]( a classical demonstration of [deadlock]( problems in concurrent programming. This example demonstrates the portability of Ada packages and tasking and illustrates many of the Ada 95 quality and style