Chapter 18
Creating Loops within Loops
IN THIS CHAPTER
Analyzing loop strategies
Diagnosing loop problems
Creating nested loops
If you’re an editor at Wiley Publishing, please don’t read the next few paragraphs. In the next few paragraphs, I give away an important trade secret (something you really don’t want me to do).
I’m about to describe a surefire process for writing a best-selling For Dummies book. Here’s the process:
Write several words to create a sentence. Do this several times to create a paragraph:
Repeat the following to form a paragraph: Repeat the following to form a sentence: Write a word.
Repeat these instructions several times to make a section. Make several sections and then make several chapters:
Repeat the following to form a best-selling book in the For Dummies series: Repeat the following to form a chapter: Repeat the following to form a section: Repeat the following to form a paragraph: Repeat the following to form a sentence: Write a word.
This process involves a loop within a loop within a loop within a loop within a loop. It’s like a verbal M.C. Escher print. Is it useful, or is it frivolous?
Well, in the world of computer programming, this kind of thing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access