Transfers the execution pointer to the exit point of the current procedure and allows a return value to be set.
RETURN [expression]
where:
In this example, the return value of the ISPRIME routine is set to "15".
CodeWatch> RETURN 15 CodeWatch> LRETURN Return value for PRIMES.ISPRIME is 15 {fixed binary(31)}
Description
The RETURN command transfers the current execution pointer to the exit point (%EXIT) of the current procedure. If the procedure returns a value, an expression indicating the return value must be given. An expression should not be given if the procedure does not return a value.
If the current execution point is already at the exit point of the current procedure, no action is taken if the procedure does not return a value, or the return value is set to the given expression if the procedure does return a value.