Reference

Download e-book for kindle: ADA An Introduction: Ada Reference Manual (July 1980) by Henry Ledgard (auth.)

By Henry Ledgard (auth.)

ISBN-10: 0387905685

ISBN-13: 9780387905686

ISBN-10: 1468401262

ISBN-13: 9781468401264

Show description

Read Online or Download ADA An Introduction: Ada Reference Manual (July 1980) PDF

Similar reference books

New PDF release: Transistor cross-reference guide

Приведены параметры транзисторов фирм: Motorola, Philips, G. E. , R. C. A. , T. I. , Westinghouse, Aeg-Tefunken. Для каждого транзистора даны аналоги и чертежи корпусов.

Additional info for ADA An Introduction: Ada Reference Manual (July 1980)

Sample text

In discussing the Ada rules for nesting and separate compilation, a number of interrelated concepts must be introduced. In their essence, these concepts are quite simple, but their details are not. In this chapter especially, we point out the essence of these concepts and leave the details to the reference manual. For illustration, we consider a program for solving the Eight Queens problem. The Eight Queens problem can be stated as follows. We wish to write a program to determine an arrangement of eight queens on a standard chessboard in such a way that no queen can capture any other.

1 defines a number of enumeration types. Using such types can add considerably to the expressiveness of a program. 2 type DAY is (HON, TUE, WED, THU, FRI, SAT, SUN); type COIN is (PENNY, NICKEL, DIME, QUARTER, HALF_DOLLAR, DOLLAR); type DIRECTION is (NORTH, EAST, SOUTH, WEST); type OP_CODE is (ADD, SUB, HUL, LOA, STA, STZ); type HALF_DAY is (AM, PH); type FILE_STATUS is (OPEN, CLOSED); type ARHY_RANK is (PRIVATE, CORPORAL, SERGEANT, LIEUTENANT, CAPTAIN, MAJOR, COLONEL, GENERAL); type CONTROL_CHAR is (NULL, END_OF_TRANSHISSION, ENQUIRE, BELL, BACKSPACE, LINE_FEED, CANCEL, ESCAPE); type PEN_STATUS is (DOWN, UP); type SHAPE is (TRIANGLE, QUADRANGLE, PENTAGON, HEXAGON); type DRIVING_CODE is (NORMAL, LIMITED, SPECIAL, VIP); type LETTER is ('A', 'B', 'C', '0', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'H', 'N', '0', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); type HEJLLETTER is ('A', 'B', 'C', '0', 'E', 'F'); PRIMITIVE 'IYPES In any language there are several types that are so commonly used that they are defined in the language itself.

_NAME as a limited private type, as in: type FILE_NAME is limited private; In either case, the visible part of the package is followed by a private part, in which the full type definition of each private type is given. This form is characteristic of situations where we want complete control over the operations of a type. Packages with private types serve a dual role. On the one hand, they prevent a user from operating on data of the type defined in the package. On the other hand, they implement the concept of an abstract data type, where the only operations over the type (aside from assignment and equality) are those given in the package.

Download PDF sample

ADA An Introduction: Ada Reference Manual (July 1980) by Henry Ledgard (auth.)


by Ronald
4.5

Rated 4.51 of 5 – based on 44 votes