< return statement > -> return ; | return < expression > ;
A return statement causes return of control to the caller of the procedure in which it is executed. Executing a return statement in the main program causes program termination.
Return statements placed in procedures that are not functions may not include an expression. Return statements placed in functions must include an expression of type integer. This expression is evaluated and its value returned as the value of the function call.
There is an implicit return statement at the end of the body of each procedure that is not a function.