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 ;
Note: Usable in the following locations:
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
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
Note: Usable in the following locations:
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
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
Note: Usable in the following locations:
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
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
Note: Usable in the following locations:
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
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
Description
next ;
Note: Usable in the following locations:
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
Examples
continue
Description
continue ;
Note: Usable in the following locations:
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
loop with condition at the end loop with condition on the beginning loop with condition at the end until is false loop with condition on the beginning until is false
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;
Continue statement in another programming language: