Skip to main content Accessibility help
×
Hostname: page-component-7bb8b95d7b-5mhkq Total loading time: 0 Render date: 2024-09-28T15:20:12.420Z Has data issue: false hasContentIssue false

27 - Finale

Published online by Cambridge University Press:  05 July 2014

Get access

Summary

This final chapter summarizes various overall aspects of Ada. The first three sections cover some general topics which have been introduced in stages throughout the book. There is then a section on the important issue of portability. The penultimate section airs a few philosophical thoughts about programming in general and Ada in particular. And then the last section is an introduction to the SPARK language which is based on Ada and is used for those essential high integrity systems where life and limb and the environment are at risk if the software is incorrect.

Names and expressions

The idea of a name should be carefully distinguished from that of an identifier. An identifier is a syntactic form such as Fred which is used for various purposes including introducing entities when they are declared. An operator has a similar status to an identifier; operators and identifiers are collectively referred to as direct names in the syntax. A name, on the other hand, may be more complex and is the form used to denote entities in general. The reader might find it helpful to consult the syntax in Appendix 3 and especially items 41 (name), 42 (direct_name), and 55 (primary).

Syntactically, a name typically starts with an identifier such as Fred or an operator symbol such as “+” and can then be followed by one or more of the following in an arbitrary order

  • • one or more index expressions in parentheses; this denotes a component of an array,

  • • a discrete range in parentheses; this denotes a slice of an array,

  • • an apostrophe plus an identifier, possibly indexed; this denotes an attribute,

  • • a dot followed by an identifier, operator or all; this denotes a record component, an object designated by an access value, or an entity in a package, task, protected object, subprogram, block or loop,

  • • an actual parameter list in parentheses; this denotes a function call.

Type conversions, qualified expressions, and character literals are also treated as names in the syntax. Character literals are considered to be parameterless functions and can be renamed. In addition, generalized references and generalized indexing, which were discussed in Section 21.6, are also considered to be names.

Names are just one of the primary components of an expression.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2014

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Finale
  • John Barnes
  • Book: Programming in Ada 2012
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781139696616.039
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Finale
  • John Barnes
  • Book: Programming in Ada 2012
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781139696616.039
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Finale
  • John Barnes
  • Book: Programming in Ada 2012
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9781139696616.039
Available formats
×