Print debugging statement: Difference between revisions

→‎{{header|REXX}}: added more wording to the REXX section preamble.
(→‎{{header|REXX}}: added more wording to the REXX section preamble.)
Line 363:
 
=={{header|REXX}}==
ThereSince areREXX otheris optionsan forinterpretive thelanguage, REXX'sit  is '''trace'''easy  to instruction,add  judicious use butof the   '''isay'''   which is the most informativean andeasy
<br>way to visually examine the values of any variable throughout the program's execution.
 
When that might not prove feasible &nbsp; (maybe because of copious output before the problem occurs), &nbsp;
<br>using the &nbsp; '''trace''' &nbsp; instruction might be a better choice.
 
 
Some of the options for the &nbsp; '''trace''' &nbsp; instruction are to display:
:* &nbsp; what commands have a non-zero return code
:* &nbsp; result of clauses
:* &nbsp; what commands are being executed
:* &nbsp; the (name of) labels being executed
:* &nbsp; command errors
:* &nbsp; command failures
:* &nbsp; commands executed that have a negative return code
:* &nbsp; an interactive mode that pauses and lets the programmer display values of variables
 
 
One of the options that shows the detailed information is the &nbsp; <big>''' ''i'' '''</big> &nbsp; option which
is the most informative and
<br>shows intermediate results within a REXX statement as it's being evaluated.
 
The first number &nbsp; (for the &nbsp; '''trace''' &nbsp; output) &nbsp; is the line number for the REXX program.
<br>(Blank lines are not &nbsp; ''traced''.)
 
ThisThe particularfollowing output is from the Regina REXX interpreter.
<lang rexx>/*REXX program to demonstrate debugging (TRACE) information while executing a program*/
/*────────────────────────────────────────────── (below) the I is for information. */