Previous Example-|-Next Chapter's Examples-|-Return to Chapter Listing
Example 6.19:
Returning to the Top of The Loop—continue
The button calls function1(), which uses a 'while' loop. This displays the value held by the counter variable ( i ) in a confirm box. If you press the Cancel button, a continue statement is executed and processing goes back to the top of the loop rather than incrementing the counter variable i:
This is the script we used:
Previous Example-|-Next Chapter's Examples-|-Return to Chapter Listing