Contents Up << >>

Return statement

The return statement causes the completion of the execution of a subprogram, and if the subprogram is a function, then it specifies the value the function should return. The syntax is: The return statement may only appear in a subprogram body. The expression part may only appear in a function body and must be the same type as the return type of the function.