return (Z.100)

<return area> ::=
<return symbol>
is associated with [<expression>]

<return symbol> ::=

<expression> in <return> or <return area> is allowed if and only if the enclosing scope is an operator or a procedure that has <procedure result>.


A return is interpreted in the following way:

a) All variables created by the interpretation of the procedure start will cease to exist.

b) The interpretation of the procedure-graph is completed and the procedure instance ceases to exist.

c) Hereafter the calling process, service (or procedure) interpretation continues at the node following the call.

When a <procedure body> or <procedure graph area> contains <return> or <return area> with an <expression>, the procedure must have at least one formal parameter with <parameter kind> in;/out; or a <procedure result>.

Any occurrence of <return> or <return area> with an <expression> inside the <procedure body> or <procedure graph area> is replaced by a <task> containing an assignment of the contained <expression> to the rightmost in/out variable, followed by a <return> or <return area> without any <expression>.