In an attempt to demonstrate to my students how easy it is to get caught in an infinite loop, I ran the following code in Processing:
int count = 0;
while (count < 100) {
println("hello world");
}
The problem is that once I'm caught in an infinite loop, there seems to be no way to get out without brute forcing Processing to quit. Perhaps I'm missing something...is there a friendlier way to exit a program that is caught in an infinite loop?