RETURN Statement v11
The RETURN
statement terminates the current function, procedure or anonymous block and returns control to the caller.
There are two forms of the RETURN
Statement. The first form of the RETURN
statement is used to terminate a procedure or function that returns void
. The syntax of the first form is:
The second form of RETURN
returns a value to the caller. The syntax of the second form of the RETURN
statement is:
expression
must evaluate to the same data type as the return type of the function.
The following example uses the RETURN
statement returns a value to the caller: