Skip to main content

Software > Software Development > IBM REXX Family >

NetRexx

Technical detail

Return instruction

   return [expression];

return is used to return control (and possibly a result) from a NetRexx program or method to the point of its invocation.

The expression (if any) is evaluated, active control constructs are terminated (as though by a leave instruction), and the value of the expression is passed back to the caller.

The result passed back to the caller is a string of type Rexx, unless a different type was specified using the returns keyword on the method instruction for the current method. In this case, the type of the value of the expression must match (or be convertible to, as by the rules for assignment) the type specified by the returns phrase.

Within a method, the use of expressions on return must be consistent. That is, either all return instructions must specify a expression, or none may. If a returns phrase is given on the method instruction for the current method then all return instructions must specify an expression.

 

 

PreviousTable of contents Next
We're here to help
Easy ways to get the answers you need.
E-mail us

or call us at
877-426-3774
Priority code:
104CBW67