Skip to main content

Software > Software Development > IBM REXX Family >

NetRexx

Technical detail

Exit instruction

exit [expression];

exit is used to unconditionally leave a program, and optionally return a result to the caller. The entire program is terminated immediately.

If an expression is given, it is evaluated and the result of the evaluation is then passed back to the caller in an implementation-dependent manner when the program terminates. Typically this value is expected to be a small whole number; most implementations will accept values in the range 0 through 250. If no expression is given, a default result (which depends on the implementation, and is typically zero) is passed back to the caller.

Example:

  j=3
exit j*4
/* Would exit with the value '12' */

'Running off the end' of a program is equivalent to the instruction return;. In the case where the program is simply a stand-alone application with no class or method instructions, this has the same effect as exit;, in that it terminates the whole program and returns a default result.



 

 

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