The EGL return statement exits from a function and optionally returns a value to the calling function.
A function that includes a returns specification must terminate with a return statement. If you do not specify a return value, EGL will use a default value (the initialization value for the return type), but this is poor coding practice. A function that lacks a returns specification can terminate with a return statement, but that statement must not include a value.
The return statement gives control to the next statement that follows the function call, even if that next statement is in an OnException clause in a try block.