Sometimes you need to control the process in a different way than by decision based on the
To do that, you have the following options:
If you want to jump out of a loop or of a switch, you can use the following statement in the program:
The processing of a loop (or switch) is relinquished and it continues with
Statements following the loop or switch.
If you want to stop processing of some iteration and go to next one, you can use the following statement in the program:
The processing jumps to the end of a loop, iteration is performed (in for loop) and the processing continues with next iteration step.
In the functions, you can use the
return word either alone or along with an
(See the following two options below.)
return statement can be in any place within the function.
There may also be multiple
return statements among which a specific one is executed depending on a condition, etc.