Elatec GmbH
Page 30 of 50
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.
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.
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.
7.1.6.12 Empty Statement
A statement, which is doing nothing is the semicolon. Example:
for (i=0; i<10; i+=1) // Waste some time and do ten times nothing
;
7.1.7 Storage Types
In the TWN3 scripting language, there is only one type of storage defined, which is the byte. A byte is
an unsigned integer with a size of 8 bits.