Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

RETURN statement

Return from a subroutine
Return from a function

The RETURN statement terminates execution of the subroutine or function procedure that contains the RETURN statement and returns control to the invoking procedure. Control is returned to the point immediately following the invocation reference.

The RETURN statement with an expression should not be used within a procedure with OPTIONS(MAIN).

A RETURN statement without an expression is invalid in a procedure with the RETURNS option. Conversely, a RETURN statement with an expression is invalid in a procedure without the RETURNS option.

A procedure with the RETURNS option must contains at least one RETURN statement (with an expression, of course).


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)