Return

LRM §8.12.

The return statement is used to complete the execution of the innermost enclosing function or procedure body.

Syntax:

[ label: ] return [ expression ];

Description:

The return statement ends the execution of a subprogram (procedure or function) in which it appears. It causes an unconditional jump to the end of the subprogram.

The return statement is only allowed in a procedure or function body. The return statement in a procedure may not return any value, while a return in a function must return a value consistent with the return type of the function.

Example:

return X + Y;

See also:

Expression, Function, Procedure