Print debugging statement: Difference between revisions

m
→‎{{header|REXX}}: added more information in the REXX section header.
m (→‎{{header|REXX}}: added a comment in the REXX section header.)
m (→‎{{header|REXX}}: added more information in the REXX section header.)
Line 204:
The first number   (for the   '''trace'''   output)   is the line number for the REXX program.
<br>Blank lines are not &nbsp; ''traced''.
 
This particular 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. */
Line 211 ⟶ 213:
say 'maximum random divisor is:' maxDiv /*display the max divisor being used. */
total= 0
 
do j=1 to 100
total= total + j/random(maxDiv)
Line 236 ⟶ 239:
7 *-* total= 0
>L> "0"
89 *-* do j=1 to 100
>L> "1"
>L> "100"
>V> "1"
910 *-* total= total + j/random(maxDiv)
>V> "0"
>V> "1"
>V> "9"
>F> "86"
>O> "0.125166666667"
>O> "0.125166666667"
1011 *-* end /*j*/
89 *-* do j=1 to 100
>V> "1"
>V> "2"
910 *-* total= total + j/random(maxDiv)
>V> "0.125166666667"
>V> "2"
>V> "9"
>F> "68"
>O> "0.33333333325"
>O> "0.458333333416666667"
1011 *-* end /*j*/
89 *-* do j=1 to 100
>V> "2"
>V> "3"
910 *-* total= total + j/random(maxDiv)
>V> "0.458333333416666667"
>V> "3"
>V> "9"
>F> "0"
910 +++ total= total + j/random(maxDiv)
Error 42 running "c:\debuggin.rex", line 910: Arithmetic overflow/underflow
Error 42.3: Arithmetic overflow; divisor must not be zero
</pre>