Flow-control structures: Difference between revisions

→‎signal: replaced the REXX program, included output of same. -- ~~~~
(→‎leave: re-instated REXX program.)
(→‎signal: replaced the REXX program, included output of same. -- ~~~~)
Line 1,859:
...
x=oopsay+1
exit 13
...
 
novalue: say
say '───────────────────────────error!─────────────────────────────────'
say '*** error! ***'
say 'that reference to oopsay (above) will cause control to get here.'
say
parse source . . fid .
say 'undefined REXX variable' condition("D")
say; say 'REXX raised a NOVALUE error in program:' fid
say
say; say 'init occurred on line' sigl
say; say 'the REXX statement is:' /*put it on separate line.*/
say
say sourceline(sigl)
say 'REXX source statement is:'
say; say 'which code:' condition('C') "error"
say sourceline(sigl)
say; 'undefined say 'REXX variable:' condition("'D"')
say
say; say "Moral: shouldn't do that."
exit 13
'''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
 
saythe 'REXX source statement is:'
x=oopsay+1
 
which code: NOVALUE error
 
REXX variable: OOPSAY
 
Moral: shouldn't do that.
</pre>
 
=={{header|Ruby}}==