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
exit
...

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 'undefined REXX variable' condition("D")
say; say 'REXX raised a NOVALUE error in program:' fid
say
say 'in line' sigl
say; say 'it 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; 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

the REXX statement is:
x=oopsay+1

which code: NOVALUE error

REXX variable: OOPSAY

Moral: shouldn't do that.
</pre>


=={{header|Ruby}}==
=={{header|Ruby}}==