The continue statement is used to stop the execution of a block
of statements inside a for or while loop statement.
It is important to understand that the continue statement does
not cause the program to exit the for or while loop statement,
but rather, the program is redirected inside the loop. All processing
is immediately stopped inside the block of statements. In a while
loop, the program jumps to the while condition test. In a for
loop, the program jumps to the for counting variable test expression.
Attempting to use a continue statement outside of a for
or while loop statement will generate an error.
Code for ContinueExample.wml
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
count reached $(count)
Code for ContinueExample.wmls
extern function findcontinue()
var count = 0;
while(count < 10)
var rand = Lang.random(10);
if(rand > 5)
if(rand < 5)
if(rand == 5)
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.