| <Syntax> |
|
|
|
RETURN [ expression ]
The expression is only allowed in a subroutine with an alternate return,
and must be a scalar Integer.
|
|
|
|
|
|
| <Semantics> |
|
|
|
The RETURN statement completes execution of a procedure, returning control to the caller.
In RETURN expression, if the expression has a value from 1 to the number of label arguments,
control will be transferred to the corresponding label; this is called “alternate return”.
It is not necessary to put a RETURN at the end of a subprogram,
as executing the END statement has the same effect.
|
|
|
|
|
|
| <Related> |
|
|
|
CALL statement,
ENTRY statement,
END FUNCTION statement,
END SUBROUTINE statement,
FUNCTION statement,
SUBROUTINE statement |
|
|