Elatec GmbH TWN3A1 User Manual
Elatec GmbH
Page 26 of 44
7.1.6.7 break Statement
Form:
break;
The break statement can be used in while, do/while, for and switch statements (loop or switch
statements).
statements).
In a loop statement, control is passed directly to the next statement outside of the loop. In a switch
statement, control is passed directly to the next statement outside of the switch body.
statement, control is passed directly to the next statement outside of the switch body.
7.1.6.8 continue Statement
Form:
continue;
The continue statement can be used in while, do/while and for statements (loop statements). It directly
passes execution to the loop continuation portion of the loop statement.
passes execution to the loop continuation portion of the loop statement.
7.1.6.9 return Statement
Two forms are possible:
Functions, which do not return a value:
return;
The execution of the current function is stopped. Execution is continued in the calling function.
Functions which return a value:
return expression;
Expression is evaluated, execution is stopped, the result of the expression is passed to the calling
function, execution is continued in the calling function.
function, execution is continued in the calling function.
7.1.6.10 goto Statement
Form:
goto label;
The goto statement directly passes execution to the position within a function, where the label
statement has been defined.
statement has been defined.
7.1.6.11 Labels
A label has the form:
identifier: statement
They may appear on any position within a function body. A label is used as destination for a goto
statement.
statement.