Talk:Jump anywhere: Difference between revisions

→‎Signal use in Rexx: added comments regarding what's legal vs. what's wrong programming. -- ~~~~
m (→‎Signal use in Rexx: show output)
(→‎Signal use in Rexx: added comments regarding what's legal vs. what's wrong programming. -- ~~~~)
Line 28:
__Warning__: Not only jumping into Do loops (as noted under REXX) is usually an error.
Jumping into or within Do groups is equally wrong.
 
:: Jumping (in REXX, '''signal'''ing) within a '''DO''' loop is legal and is illustrated within the Regina PDF documentation. [What is ''wrong'' is merely a judgement call.] It's the execution of the '''DO''' or the '''END''' statement [after a '''signal''' instruction is executed] that is illegal and thus causes a '''syntax''' error. I don't want to endorse nor propose its use. I was merely showing what is legal, not what is considered bad practice (or wrongness) by some. I don't pontificate what should be considered/practiced/used when it comes to what is legal vs. what is bad programming. -- [[User:Gerard Schildberger|Gerard Schildberger]] 21:02, 9 December 2012 (UTC)
 
Please consider Signal only for condition handling or very global jumps such as Signal end_of_job.
Line 39 ⟶ 41:
4 *-* End
Error 10 running H:\sig.rex line 4: Unexpected or unmatched END
Error 10.1: END has no corresponding DO, LOOP, or SELECT
</pre>
 
: Please note that that your (illegal) code is "executing" the '''END''' instruction which has been rendered invalid by the execution of the '''signal''' instruction, which resulted in the '''syntax''' error (as cautioned in the comments in the REXX section header). -- [[User:Gerard Schildberger|Gerard Schildberger]] 21:02, 9 December 2012 (UTC)
 
: I use the '''signal''' instruction for other than error condition handling or very global jumps for E-O-J and such. There are other uses for the '''signal''' instruction than that. -- [[User:Gerard Schildberger|Gerard Schildberger]] 21:02, 9 December 2012 (UTC)