Pragmatic directives: Difference between revisions

m
→‎{{header|REXX}}: added another SIGNAL construct.
m (→‎{{header|REXX}}: added SIGNAL & CALL on|off conditions.)
m (→‎{{header|REXX}}: added another SIGNAL construct.)
Line 378:
::*   OPTIONS               {xxx yyy zzz}
::*   TRACE                   {options}
::*   SIGNAL                 {ON│OFF}   SYNTAX
::*   SIGNAL                 {ON│OFF}   NOVALUE
::*   SIGNAL                 {ON│OFF}   LOSTDIGITS
::*   SIGNAL                 {ON│OFF}   NOVALUE
::*   SIGNAL                 {ON│OFF}   SYNTAX
::*   SIGNAL│CALL       {ON│OFF}   ERROR
::*   SIGNAL│CALL       {ON│OFF}   FAILURE
::*   SIGNAL│CALL       {ON│OFF}   HALT
::*   SIGNAL│CALL       {ON│OFF}   NOTREADY
Line 484 ⟶ 485:
There are a number of options for
the   '''trace'''   instruction, and they won't be explained here.
 
===signal on syntax===
If the REXX interpreter detects a   syntax   error in the REXX
program,   (and the REXX interpreter
<br>determines that the error can still be handled by the erroneous REXX
program), &nbsp; control branches
<br>to the label &nbsp; &nbsp; '''syntax'''. &nbsp; The label may be in mixed case.
 
===signal off syntax===
This indicates to take the default action which REXX issues an error message
and terminates the
<br>REXX program.
 
===signal on novalue===
If the REXX interpreter detects an uninitialized variable is used in an
evaluated expression, &nbsp; control
<br>branches to the label &nbsp; &nbsp; '''novalue'''. &nbsp; The label
may be in mixed case.
 
===signal off novalue===
This indicates to take the default action which is to quietly return the value of
the uppercase version
<br>of the variable name and continue execution of the REXX program.
 
===signal on lostdigits===
Line 525 ⟶ 503:
condition and continue
<br>execution of the REXX program.
 
===signal on novalue===
If the REXX interpreter detects an uninitialized variable is used in an
evaluated expression, &nbsp; control
<br>branches to the label &nbsp; &nbsp; '''novalue'''. &nbsp; The label
may be in mixed case.
 
===signal off novalue===
This indicates to take the default action which is to quietly return the value of
the uppercase version
<br>of the variable name and continue execution of the REXX program.
 
===signal on syntax===
If the REXX interpreter detects a &nbsp; syntax &nbsp; error in the REXX
program, &nbsp; (and the REXX interpreter
<br>determines that the error can still be handled by the erroneous REXX
program), &nbsp; control branches
<br>to the label &nbsp; &nbsp; '''syntax'''. &nbsp; The label may be in mixed case.
 
===signal off syntax===
This indicates to take the default action which REXX issues an error message
and terminates the
<br>REXX program.
 
===signal on error; call on error===
Line 533 ⟶ 534:
 
===signal off error; call off error===
This indicates to take the default action which means the special
variable &nbsp; '''RC''' &nbsp; ('''R'''eturn '''C'''ode) &nbsp;
<br>is quietly defined, &nbsp; and execution continues of the REXX program.
 
===signal on failure; call on failure===
If the REXX interpreter detects a &nbsp; failure &nbsp; from a
host system command issued by
<br>the REXX program, &nbsp; control branches to the
label &nbsp; &nbsp; '''failure'''. &nbsp; The label may be in mixed case.
 
===signal off failure; call off failure===
This indicates to take the default action which means the special
variable &nbsp; '''RC''' &nbsp; ('''R'''eturn '''C'''ode) &nbsp;