9.4 Functionality in High-Level Languages

Two pseudocode constructs—selection and repetition (looping)—are hallmarks of imperative languages. In Chapter 6, we implemented these constructions in assembly language, showing how detailed the instructions had to be. We also examined these constructs along with subprograms in pseudocode. In high-level languages, selection and repetition are very easy. Subprograms and parameter passing, however, are more complicated.

First, we review the concept of a Boolean expression, which is the construct that high-level languages use to make choices. We then examine other constructs that high-level languages provide to make programming easier and safer.

Boolean Expressions

In Chapter 6, we wrote an algorithm ...

Get Computer Science Illuminated, 7th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.