Anonymous user
Flow-control structures: Difference between revisions
→signal: added indentation, list of some ways to HALT a REXX program. -- ~~~~
m (→signal: added more panache to a REXX statement. -- ~~~~) |
(→signal: added indentation, list of some ways to HALT a REXX program. -- ~~~~) |
||
Line 1,844:
The '''signal''' statement is also used to transfer control in case of some specific conditions:
::* when an I/O stream (could be a file) isn't ready.
::* when the REXX program used a variable that isn't defined.
::* when a REXX syntax error occurs.
::* when the program is '''halt'''ed (
::::* Ctrl-Alt-Del under VM/CMS or MVS/TSO (generic names)
* when there is a loss of digits (for the newer REXXes).▼
::::* HX under VM/CMS or MVS/TSO (generic names)
* when a command executed returns an error return code [other than 0 (zero)].▼
::::* PA1 under VM/CMS or MVS/TSO (generic names)
* when a command executed indicates a failure.▼
::::* Ctrl-c some Unix, BSD variants
::::* Del (key) most System V variants
::::* SIGINT (SIGnal INTerrupt) some variants of UNIX
::::* kill(1) from the command line (same as above)
::::* signal(3) from a program (same as above)
::::* [to be sure, check with your operating system documentation]
▲::* when there is a loss of digits (for the newer REXXes).
▲::* when a command executed returns an error return code [other than 0 (zero)].
▲::* when a command executed indicates a failure.
(Also, see '''raising conditions''' above.)
|