{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Dale - Computer Science Illuminated 283

Dale - Computer Science Illuminated 283 - 256 Chapter 8...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
256 Chapter 8 High-Level Programming Languages What happens if the argument is a negative number? The subprogram just keeps calling itself until the run-time support system runs out of memory. This situation is called infinite recursion and is equivalent to an infinite loop. Recursion is a very powerful and elegant tool. However, not all prob- lems can easily be solved recursively, and not all problems that have an obvious recursive solution should be solved recursively. But there are many problems for which a recursive solution is preferable. If the problem state- ment logically falls into two cases, a base case and a general case, recursion is a viable alternative. Asynchronous Processing Most of you have grown up in the windows generation. Notice that the w is not uppercase. We are not talking about the Microsoft Windows oper- ating system, but the concept that input and output can be accomplished through windows on the screen. At a minimum you can get rid of a window by clicking a box in the corner of the window. “Clicking” is the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online