Flow-control structures: Difference between revisions
Content added Content deleted
(→leave: re-instated REXX program.) |
(→signal: replaced the REXX program, included output of same. -- ~~~~) |
||
Line 1,859: | Line 1,859: | ||
... |
... |
||
x=oopsay+1 |
x=oopsay+1 |
||
⚫ | |||
... |
|||
novalue: say |
novalue: say |
||
say '───────────────────────────error!─────────────────────────────────' |
|||
say '*** error! ***' |
|||
say 'that reference to oopsay (above) will cause control to get here.' |
|||
say |
|||
parse source . . fid . |
|||
⚫ | |||
say; say 'REXX raised a NOVALUE error in program:' fid |
|||
say |
|||
say ' |
say; say 'it occurred on line' sigl |
||
say; say 'the REXX statement is:' /*put it on separate line.*/ |
|||
say |
|||
⚫ | |||
⚫ | |||
say; say 'which code:' condition('C') "error" |
|||
⚫ | |||
⚫ | |||
say |
|||
say; say "Moral: shouldn't do that." |
|||
⚫ | |||
'''output''' |
|||
...</lang> |
|||
<pre> |
|||
───────────────────────────error!───────────────────────────────── |
|||
that reference to oopsay (above) will cause control to get here. |
|||
REXX raised a NOVALUE error in program: D:\flow_sig.rex |
|||
it occurred on line 20 |
|||
⚫ | |||
x=oopsay+1 |
|||
which code: NOVALUE error |
|||
REXX variable: OOPSAY |
|||
Moral: shouldn't do that. |
|||
</pre> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |