Talk:Jump anywhere: Difference between revisions

→‎Signal use in Rexx: REXX clarifications
(→‎Signal use in Rexx: added comments regarding what's legal vs. what's wrong programming. -- ~~~~)
(→‎Signal use in Rexx: REXX clarifications)
Line 31:
:: 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)
 
::: Your text:
Please consider Signal only for condition handling or very global jumps such as Signal end_of_job.
"Note: some REXXes don't allow jumping into a DO loop, although the language
specificiations appear to allow it, as long as the END or the DO loop
isn't executed. The following used PC/REXX to illustrate this example."
is, in my opinion too liberal. It's not only Do loops where Signal is bad!
--[[User:Walterpachl|Walterpachl]] 08:22, 10 December 2012 (UTC)
 
Example:
<lang rexx> Do
Line 45 ⟶ 51:
 
: 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)
:: This explain what I tried to show.
 
: 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)
:: Thats what I said:
"Please consider Signal only for condition handling or very global jumps such as Signal end_of_job."
2,289

edits