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
This is the end of the preview.
access the rest of the document.
Control flow, recursive solution, high-level programming languages, obvious recursive solution