Abstract
The programs listed in the previous chapter were architecturally simple because they were straight line programs. That is, statements were executed in the order in which they appeared without any branching or repetition. Most programming problems are not so simple. In fact, the great power of programming languages stems from their ability to instruct the computer to perform the same task repeatedly, or to perform a different task if parameters change. In high-level programming languages, this is accomplished with control flow statements that allow you to alter the sequential flow. Control flow statements fall into two general categories: conditional branching and looping. Conditional branching is the ability to decide whether or not to execute code based on the value of an expression. Looping, also called iteration, is the ability to perform the same set of operations repeatedly until a special condition is met.
“Begin at the beginning,” the King said, very gravely, “and go on till you come to the end: then stop.”
Lewis Carroll, Alice in Wonderland
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 1996 Springer-Verlag New York, Inc.
About this chapter
Cite this chapter
Darnell, P.A., Margolis, P.E. (1996). Control Flow. In: C A Software Engineering Approach. Springer, New York, NY. https://doi.org/10.1007/978-1-4612-4020-4_5
Download citation
DOI: https://doi.org/10.1007/978-1-4612-4020-4_5
Publisher Name: Springer, New York, NY
Print ISBN: 978-0-387-94675-7
Online ISBN: 978-1-4612-4020-4
eBook Packages: Springer Book Archive