Print debugging statement: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: added a comment in the REXX section header.) |
m (→{{header|REXX}}: added more information in the REXX section header.) |
||
Line 204: | Line 204: | ||
The first number (for the '''trace''' output) is the line number for the REXX program. |
The first number (for the '''trace''' output) is the line number for the REXX program. |
||
<br>Blank lines are not ''traced''. |
<br>Blank lines are not ''traced''. |
||
This particular output is from the Regina REXX interpreter. |
|||
<lang rexx>/*REXX program to demonstrate debugging (TRACE) information while executing a program*/ |
<lang rexx>/*REXX program to demonstrate debugging (TRACE) information while executing a program*/ |
||
/*────────────────────────────────────────────── (below) the I is for information. */ |
/*────────────────────────────────────────────── (below) the I is for information. */ |
||
Line 211: | Line 213: | ||
say 'maximum random divisor is:' maxDiv /*display the max divisor being used. */ |
say 'maximum random divisor is:' maxDiv /*display the max divisor being used. */ |
||
total= 0 |
total= 0 |
||
do j=1 to 100 |
do j=1 to 100 |
||
total= total + j/random(maxDiv) |
total= total + j/random(maxDiv) |
||
Line 236: | Line 239: | ||
7 *-* total= 0 |
7 *-* total= 0 |
||
>L> "0" |
>L> "0" |
||
9 *-* do j=1 to 100 |
|||
>L> "1" |
>L> "1" |
||
>L> "100" |
>L> "100" |
||
>V> "1" |
>V> "1" |
||
10 *-* total= total + j/random(maxDiv) |
|||
>V> "0" |
>V> "0" |
||
>V> "1" |
>V> "1" |
||
>V> "9" |
>V> "9" |
||
>F> " |
>F> "6" |
||
>O> "0. |
>O> "0.166666667" |
||
>O> "0. |
>O> "0.166666667" |
||
11 *-* end /*j*/ |
|||
9 *-* do j=1 to 100 |
|||
>V> "1" |
>V> "1" |
||
>V> "2" |
>V> "2" |
||
10 *-* total= total + j/random(maxDiv) |
|||
>V> "0. |
>V> "0.166666667" |
||
>V> "2" |
>V> "2" |
||
>V> "9" |
>V> "9" |
||
>F> " |
>F> "8" |
||
>O> "0. |
>O> "0.25" |
||
>O> "0. |
>O> "0.416666667" |
||
11 *-* end /*j*/ |
|||
9 *-* do j=1 to 100 |
|||
>V> "2" |
>V> "2" |
||
>V> "3" |
>V> "3" |
||
10 *-* total= total + j/random(maxDiv) |
|||
>V> "0. |
>V> "0.416666667" |
||
>V> "3" |
>V> "3" |
||
>V> "9" |
>V> "9" |
||
>F> "0" |
>F> "0" |
||
10 +++ total= total + j/random(maxDiv) |
|||
Error 42 running "c:\debuggin.rex", line |
Error 42 running "c:\debuggin.rex", line 10: Arithmetic overflow/underflow |
||
Error 42.3: Arithmetic overflow; divisor must not be zero |
Error 42.3: Arithmetic overflow; divisor must not be zero |
||
</pre> |
</pre> |