Basic <-> Pascal | Break statement
Basic Used keywords: do exit
exit do
Description
exit do
Note: Usable in the following locations:
loop with condition at the end loop with condition at the end until is false
loop with condition at the end loop with condition at the end until is false
Examples
Basic
Even one example in what situations we can use the operation break statement:i=10
do
i=i-1
loop while i > 0
do
i=i+1
if i=5 then
exit do
end if
loop while i <10
.
Pascal Used keywords: break
break
Description
break ;
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
Pascal
Even one example in what situations we can use the operation break statement:i:=10;
repeat dec(i) until not i > 0;
repeat
inc(i);
if i=5 then
break;
until not i <10;
Basic Used keywords: exit
exit for
Description
exit for
Note: Usable in the following locations:
Examples
Basic
Even one example in what situations we can use the operation break statement:i=10
do
i=i-1
loop while i > 0
do
i=i+1
if i=5 then
exit do
end if
loop while i <10
.
Pascal Used keywords: break
break
Description
break ;
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
Pascal
Even one example in what situations we can use the operation break statement:i:=10;
repeat dec(i) until not i > 0;
repeat
inc(i);
if i=5 then
break;
until not i <10;
Basic Used keywords: while exit
exit while
Description
exit while
Note: Usable in the following locations:
loop with condition on the beginning loop with condition on the beginning until is false
loop with condition on the beginning loop with condition on the beginning until is false
Examples
Basic
Even one example in what situations we can use the operation break statement:i=10
do
i=i-1
loop while i > 0
do
i=i+1
if i=5 then
exit do
end if
loop while i <10
.
Pascal Used keywords: break
break
Description
break ;
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
Pascal
Even one example in what situations we can use the operation break statement:i:=10;
repeat dec(i) until not i > 0;
repeat
inc(i);
if i=5 then
break;
until not i <10;
Break statement in another programming language:
Differences to: