RETURN

Syntax

A RETURN statement assigns the value of an expression to the containing function and returns control to the caller of the function. Every execution path in a function must lead to a RETURN statement. Do not attempt to exit a function without executing a RETURN statement.
RETURN expression;

expression :=
    arithmetic-expression
  | boolean-expression

Examples

Return from a function with a computed arithmetic value:

	 RETURN (X*X + 2*X + 5);

Return from a function with a variable value:

	RETURN (counter);