Skip to main content

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

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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

Publish with us

Policies and ethics