ebook img

Programming in Ada 2012 with a Preview of Ada 2022 PDF

993 Pages·2022·5.436 MB·English
by  Barnes.
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Programming in Ada 2012 with a Preview of Ada 2022

Programming in Ada 2012 with a Preview of Ada 2022 Published online by Cambridge University Press Published online by Cambridge University Press Programming in Ada 2012 with a Preview of Ada 2022 JOHN BARNES Published online by Cambridge University Press UniversityPrintingHouse,CambridgeCB28BS,UnitedKingdom OneLibertyPlaza,20thFloor,NewYork,NY10006,USA 477WilliamstownRoad,PortMelbourne,VIC3207,Australia 314–321,3rdFloor,Plot3,SplendorForum,JasolaDistrictCentre,NewDelhi–110025,India 103PenangRoad,#05–06/07,VisioncrestCommercial,Singapore238467 CambridgeUniversityPressispartoftheUniversityofCambridge. ItfurtherstheUniversity’smissionbydisseminatingknowledgeinthepursuitof education,learning,andresearchatthehighestinternationallevelsofexcellence. www.cambridge.org Informationonthistitle:www.cambridge.org/9781009181341 DOI:10.1017/9781009181358 ©JohnBarnes2014,2022 Thispublicationisincopyright.Subjecttostatutoryexception andtotheprovisionsofrelevantcollectivelicensingagreements, noreproductionofanypartmaytakeplacewithoutthewritten permissionofCambridgeUniversityPress. Firstpublished2014 Reprintedwithcorrectionsandadditions2021 Secondedition2022 AcataloguerecordforthispublicationisavailablefromtheBritishLibrary. ISBN978-1-009-18134-1Paperback Additionalresourcesforthispublicationatwww.cambridge.org/barnes12-22 CambridgeUniversityPresshasnoresponsibilityforthepersistenceoraccuracyof URLsforexternalorthird-partyinternetwebsitesreferredtointhispublication anddoesnotguaranteethatanycontentonsuchwebsitesis,orwillremain, accurateorappropriate. Published online by Cambridge University Press To Barbara Published online by Cambridge University Press Published online by Cambridge University Press Contents Foreword xv Preface xvii Part 1 An Overview 1 1 Introduction 3 1.1 Standard development 3 1.2 Software engineering 4 1.3 Evolution and abstraction 6 1.4 Structure and objectives of this book 8 1.5 References 10 2 Simple Concepts 11 2.1 Key goals 11 2.2 Overall structure 12 2.3 The scalar type model 17 2.4 Arrays and records 19 2.5 Access types 22 2.6 Errors and exceptions 23 2.7 Terminology 26 3 Abstraction 27 3.1 Packages and private types 27 3.2 Objects and inheritance 30 3.3 Classes and polymorphism 34 3.4 Genericity 40 3.5 Object oriented terminology 41 3.6 Tasking 43 4 Programs and Libraries 47 4.1 The hierarchical library 47 4.2 Input–output 49 vii Published online by Cambridge University Press viii Contents 4.3 Numeric library 52 4.4 Running a program 54 Program 1 Magic Moments 59 Part 2 Algorithmic Aspects 63 5 Lexical Style 65 5.1 Syntax notation 65 5.2 Lexical elements 66 5.3 Identifiers 67 5.4 Numbers 68 5.5 Comments 71 5.6 Pragmas and aspects 71 6 Scalar Types 73 6.1 Object declarations and assignments 73 6.2 Blocks and scopes 75 6.3 Types 77 6.4 Subtypes 79 6.5 Simple numeric types 81 6.6 Enumeration types 87 6.7 The type Boolean 90 6.8 Categories of types 93 6.9 Expression summary 95 7 Control Structures 101 7.1 If statements 101 7.2 Case statements 105 7.3 Loop statements 108 7.4 Goto statements and labels 114 7.5 Statement classification 111 8 Arrays and Records 117 8.1 Arrays 117 8.2 Array types 122 8.3 Array aggregates 127 8.4 Characters and strings 132 8.5 Arrays of arrays and slices 135 8.6 One-dimensional array operations 138 8.7 Records 143 9 Expression Structures 149 9.1 Membership tests 149 9.2 If expressions 151 Published online by Cambridge University Press Contents ix 9.3 Case expressions 155 9.4 Quantified expressions 157 10 Subprograms 161 10.1 Functions 161 10.2 Operators 169 10.3 Procedures 171 10.4 Aliasing 177 10.5 Named and default parameters 179 10.6 Overloading 181 10.7 Declarations, scopes, and visibility 182 11 Access Types 189 11.1 Flexibility versus integrity 189 11.2 Access types and allocators 191 11.3 Null exclusion and constraints 198 11.4 Aliased objects 200 11.5 Accessibility 204 11.6 Access parameters 206 11.7 Anonymous access types 210 11.8 Access to subprograms 214 11.9 Storage pools 220 Program 2 Sylvan Sorter 223 Part 3 The Big Picture 227 12 Packages and Private Types 229 12.1 Packages 229 12.2 Private types 234 12.3 Primitive operations and derived types 241 12.4 Equality 247 12.5 Limited types 251 12.6 Resource management 257 13 Overall Structure 263 13.1 Library units 263 13.2 Subunits 266 13.3 Child library units 268 13.4 Private child units 272 13.5 Mutually dependent units 279 13.6 Scope, visibility, and accessibility 283 13.7 Renaming 287 13.8 Programs, partitions, and elaboration 292 Published online by Cambridge University Press

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.