Talk:Jump anywhere: Difference between revisions

Content added Content deleted
(→‎Signal use in Rexx: REXX clarifications)
(→‎Signal use in Rexx: added comments about the REXX signal instruction. -- ~~~~)
Line 33: Line 33:
::: Your text:
::: Your text:
"Note: some REXXes don't allow jumping into a DO loop, although the language
"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
specifications 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."
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!
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)
--[[User:Walterpachl|Walterpachl]] 08:22, 10 December 2012 (UTC)

:::: What exactly is too liberal about my statement? I don't understand your concerns about what is allowed as far as the REXX language specification (as per the rules of using the SIGNAL instruction). I have no opinion about the validity of the REXX specifications, only that what was shown is a legal construct --- especially if the code is actually shown in the Regina REXX language specification ("The Regina Rexx Interpreter" PDF document). As for your opinion about the "badness" of the '''signal''' instruction, that's an opinion, but '''signal''' is still part of the REXX language, warts and all. -- [[User:Gerard Schildberger|Gerard Schildberger]] 09:00, 10 December 2012 (UTC)


Example:
Example:
Line 53: Line 55:
:: This explain what I tried to show.
:: 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)
::: What you showed was an illegal REXX construct which resulted in a '''SYNTAX''' error. The code snipette isn't a valid REXX program (as mentioned earlier). I was showing a use for the SIGNAL instruction, not how to ''not'' use the SIGNAL instruction. -- [[User:Gerard Schildberger|Gerard Schildberger]] 09:00, 10 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)
:: Thats what I said:
:: Thats what I said:
"Please consider Signal only for condition handling or very global jumps such as Signal end_of_job."
"Please consider Signal only for condition handling or very global jumps such as Signal end_of_job."

::: What I was objecting mildly to was your suggestion that the '''signal''' instruction should ''only'' be considered for condition handling or very global jumps such as signal end-of-job. It has other uses. This isn't the forum for what REXX statements should or shouldn't be used. If it solves a problem, use it. If you have a better solution, include an example of its use. Rosetta Code is about showing solutions (or flavors of solutions) for the tasks specified. There's always room for more examples and methods. There are always more ways to skin a cat. -- [[User:Gerard Schildberger|Gerard Schildberger]] 09:00, 10 December 2012 (UTC)