continue statement: continue, continue while, continue for, continue do, next

this command is used to start the next iteration. This means that if we execute this command we'll break the loop and continue with the next iteration.

continue

Description

continue ;
Used keywords: continue
compatible programing languages:
C | Visual C++ .NET | C++ | C# | Java | JavaScript | PHP

Examples

Example

continue statement the possible of use:
i=0;
while (i<10) ++i;
x =0;
while (i<20)
{
 i= i+2;
 if (i==16)
 {
    continue;
 }
 x++; 
}

continue while

Description

continue while
Used keywords: while continue
compatible programing languages:
Basic | FreeBASIC | Visual Basic .NET

Examples

Basic

continue statement the possible of use:
i=0
do while i<10
 i=i+1
loop
x =0
do while i<20
 i= i+2
 if i=16 then
    continue while
 end if
 x=x+1 
loop

continue for

Description

continue for
Used keywords: continue
compatible programing languages:
Basic | FreeBASIC | Visual Basic .NET

Examples

Basic

continue statement the possible of use:
i=0
do while i<10
 i=i+1
loop
x =0
do while i<20
 i= i+2
 if i=16 then
    continue while
 end if
 x=x+1 
loop

continue do

Description

continue do
Used keywords: do continue
compatible programing languages:
Basic | FreeBASIC | Visual Basic .NET

Examples

Basic

continue statement the possible of use:
i=0
do while i<10
 i=i+1
loop
x =0
do while i<20
 i= i+2
 if i=16 then
    continue while
 end if
 x=x+1 
loop

next

continue

Description

continue ;
Used keywords: continue
compatible programing languages:
Pascal | Object Pascal | Free Pascal

Examples

Object Pascal

continue statement the possible of use:
i:=0;
while i<10 do inc(i);
x :=0;
while i<20 do
begin
 i:= i+2;
 if i=16 then
 begin
    continue
 end;
 inc(x); 
end;
Languages: en hu cz sk