RETURN statement v17
The RETURN
statement terminates the current function, procedure, or anonymous block and returns control to the caller.
Syntax
The RETURN
statement has two forms. The first form of the RETURN
statement terminates a procedure or function that returns void
. The syntax of this form is:
The second form of RETURN
returns a value to the caller. The syntax of this form is:
expression
must evaluate to the same data type as the return type of the function.
Example
This example uses the RETURN
statement and returns a value to the caller: