< Previous | Contents | Next >
I set up the loop with the following line:
while (true)
Technically, this creates an infinite loop. This might seem odd coming so soon after a warning to avoid infinite loops, but this particular loop isn’t really infinite because I put an exit condition in the loop body.
Hi n t
Although a while (true) loop sometimes can be clearer than a traditional loop, you should also try to minimize your use of these loops.