![]() | ![]() | ![]() | Return Statements |
< return statement > | -> | return | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | return < expression > |
A return statement causes return of control to the caller of the function in which it is executed. Executing a return statement in the main program causes program termination.
Return statements placed in functions declared to return void may not include an expression. Return statements placed in all other 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 function that returns void.
![]() | ![]() | ![]() | Return Statements |