Talk:Jump anywhere: Difference between revisions

→‎Signal use in Rexx: answered 'which Rexx'
(→‎Signal use in Rexx: "discussion" gets out of hand)
(→‎Signal use in Rexx: answered 'which Rexx')
 
(3 intermediate revisions by 2 users not shown)
Line 51:
 
"Signal should only be used for very global jumps and condition handling since Signal within or into Do loops, do groups or other control structures may not work as desired" --[[User:Walterpachl|Walterpachl]] 05:03, 12 December 2012 (UTC)
 
: Sorry, but I will '''not''' pontificate to others that certain (REXX) statements should ''only'' be used for thus and thus (for whatever reason, certainly the least of which is that the '''signal''' instruction is behaving as described in a REXX language specification (jumping into a '''DO''' loop and executing a '''DO''' or '''END''' instruction '''will''' cause a REXX SYNTAX error). As I mentioned elsewhere, there are other uses of the '''signal''' instruction than "long jumps" and "conditioning handling". By the way, my ''Regina oriented text'' (whatever that means --- it doesn't use any instructions or options not available in every REXX interpreter), it isn't even a Regina REXX "program"; it was executed with PC/REXX as indicated in the REXX section header comments. I'm sorry that you can't follow this discussion. Your example (below) just shows a SYNTAX error for an illegal use of the '''signal''' instruction (the reason for the failure has been pointed out), but it fails to show a valid use of the REXX '''signal''' statement, which is what this RC task is about. If you have an valid example of the '''signal''' statement doing a "jump anywhere", then, please, add another REXX version that shows that. -- [[User:Gerard Schildberger|Gerard Schildberger]] 05:48, 12 December 2012 (UTC)
::: That's what I did right now. Hopefully in an agreeable way. Thanks --[[User:Walterpachl|Walterpachl]] 09:45, 12 December 2012 (UTC)
 
:::: Exactly which REXX interpreter did you test that code on? And also, what REXX was used for the example below? -- [[User:Gerard Schildberger|Gerard Schildberger]] 20:06, 12 December 2012 (UTC)
 
::::: The only ones I have: ooRexx and REXX/TSO --[[User:Walterpachl|Walterpachl]] 20:34, 12 December 2012 (UTC)
 
-----
 
as exemplified by this example:
Line 68 ⟶ 77:
:: why did you explain here what I wanted to demonstrate? and what do you mean by: "There are other uses for the '''signal''' instruction than that."??
--[[User:Walterpachl|Walterpachl]] 05:03, 12 December 2012 (UTC)
 
::: I explained because just showing a SYNTAX error for an illegal use of a '''signal''' instruction isn't explaining. Non-REXX programmers won't understand why it happened. I explained what happened and WHY it happened (using a SIGNAL instruction illegally: that is, "jumping" '''into''' a DO loop and executing the END statement). Showing an invalid example of the SIGNAL instruction and then getting a REXX SYNTAX error without informing of WHY it happened isn't doing non-REXX programmers any service. As for other uses of SIGNAL, I was referring to other uses other than ''very global jumps'' and ''condition handling''. Those other uses aren't within the scope of this particular RC task, so they were obviously not included herein. I have demonstrated those uses in REXX examples elsewhere in Rosetta Code. -- [[User:Gerard Schildberger|Gerard Schildberger]] 05:48, 12 December 2012 (UTC)
 
: 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)
2,295

edits