The return Statement

The return statement ends the execution of the function in which it appears. It can also return a value to the calling function. For example:

return; /* End function and return no value */

return myvariable; /* End function and return value of myvariable */