RosettaCodeData/Task/Program-termination/REXX/program-termination-1.rexx

30 lines
1.9 KiB
Rexx
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
/*REXX program showing five ways to perform a REXX program termination. */
/*─────1st way────────────────────────────────────────────────────────*/
exit
/*─────2nd way────────────────────────────────────────────────────────*/
2015-02-20 00:35:01 -05:00
exit (expression) /*Note: the "expression" doesn't need parentheses*/
2013-04-10 23:57:08 -07:00
/*"expression" is any REXX expression. */
/*─────3rd way────────────────────────────────────────────────────────*/
return /*which returns to this program's invoker. If */
/*this is the main body (and not a subroutine), */
/*the REXX interpreter terminates the program. */
/*─────4th way────────────────────────────────────────────────────────*/
2015-02-20 00:35:01 -05:00
return (expression) /* [See the note above concerning parentheses.] */
2013-04-10 23:57:08 -07:00
/*─────5th way────────────────────────────────────────────────────────*/
/*control*/
/**/ /*if there is no EXIT and program control "falls */
/**/ /*through" to the "bottom" (end) of the program, */
/**/ /*an EXIT is simulated and the program is */
/**/ /*terminated. */
/**/
/* e-o-f */ /* e-o-f = end-of-file. */