Coding Paradigms

  • Christine N. Ausnit
  • Norman H. Cohen
  • John B. Goodenough
  • R. Sterling Eanes
Part of the Springer Books on Professional Computing book series (SB COMPUTING)

Abstract

The studies presented in this chapter deal with distinctive aspects of Ada arising in the coding of statements and expressions. The study “Use of Slices” describes how loops processing arrays one element at a time can often be rewritten in Ada as single assignment statements processing an entire slice. The second study discusses short circuit control forms, explaining the intended use of the and then and or else operations: not to optimize the evaluation of Boolean expressions, but to allow Boolean expressions in which one operand might not be defined in cases where the value of that operand cannot affect the ultimate result anyway. One of the examples illustrating the proper use of short circuit control forms, a loop to search an array for a particular value, also figures prominently in case study 3.3, “Loop Statements,” which compares various alternatives for writing loops and specifying how loops terminate. The final study, “Use of Block Statements for Local Renaming,” shows how a block statement containing renaming declarations can be used in much the same way as a Pascal with statement.

Keywords

Boolean Expression Block Statement Exit Statement Loop Statement List Pointer 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer Japan 1985

Authors and Affiliations

  • Christine N. Ausnit
    • 1
  • Norman H. Cohen
    • 1
  • John B. Goodenough
    • 1
  • R. Sterling Eanes
    • 1
  1. 1.SofTech, Inc.WalthamUSA

Personalised recommendations