METHODRET Verb
Syntax
METHODRET {expr}
Description
The METHODRET verb returns program flow to the point at which the method was invoked, passing back the value of expr.
|
Parameter |
Description |
|---|---|
|
expr |
Any BBj expression compatible with the defined return type of this method. |
Notes
A METHODRET statement will generate !ERROR=202 if it is encountered anywhere outside a method definition.
If
the method is defined to have a return type of void, the expr must be omitted.
If
a method is defined to have a return type other than void, expr must evaluate to a result that is compatible
with the defined return type of the method.
If
program execution hits a METHODEND statement, it's treated like a METHODRET
with no return expression. This is only valid if the method has a defined
return type of void.
Example
|